Changeset 137 in code for trunk/morty.go
- Timestamp:
- Mar 28, 2021, 12:28:03 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/morty.go
r136 r137 1055 1055 1056 1056 func main() { 1057 cfg.ListenAddress = *flag.String("listen", cfg.ListenAddress, "Listen address") 1058 cfg.Key = *flag.String("key", cfg.Key, "HMAC url validation key (base64 encoded) - leave blank to disable validation") 1059 cfg.Debug = *flag.Bool("debug", cfg.Debug, "Debug mode") 1060 cfg.RequestTimeout = *flag.Uint("timeout", cfg.RequestTimeout, "Request timeout") 1061 cfg.FollowRedirect = *flag.Bool("followredirect", cfg.FollowRedirect, "Follow HTTP GET redirect") 1057 listenAddress := flag.String("listen", cfg.ListenAddress, "Listen address") 1058 key := flag.String("key", cfg.Key, "HMAC url validation key (base64 encoded) - leave blank to disable validation") 1059 IPV6 := flag.Bool("ipv6", cfg.IPV6, "Allow IPv6 HTTP requests") 1060 debug := flag.Bool("debug", cfg.Debug, "Debug mode") 1061 requestTimeout := flag.Uint("timeout", cfg.RequestTimeout, "Request timeout") 1062 followRedirect := flag.Bool("followredirect", cfg.FollowRedirect, "Follow HTTP GET redirect") 1062 1063 proxyenv := flag.Bool("proxyenv", false, "Use a HTTP proxy as set in the environment (HTTP_PROXY, HTTPS_PROXY and NO_PROXY). Overrides -proxy, -socks5, -ipv6.") 1063 1064 proxy := flag.String("proxy", "", "Use the specified HTTP proxy (ie: '[user:pass@]hostname:port'). Overrides -socks5, -ipv6.") 1064 1065 socks5 := flag.String("socks5", "", "Use a SOCKS5 proxy (ie: 'hostname:port'). Overrides -ipv6.") 1065 cfg.IPV6 = *flag.Bool("ipv6", cfg.IPV6, "Use IPv6 and IPv4 to send HTTP requests.")1066 1066 version := flag.Bool("version", false, "Show version") 1067 1067 flag.Parse() 1068 1069 cfg.ListenAddress = *listenAddress 1070 cfg.Key = *key 1071 cfg.IPV6 = *IPV6 1072 cfg.Debug = *debug 1073 cfg.RequestTimeout = *requestTimeout 1074 cfg.FollowRedirect = *followRedirect 1068 1075 1069 1076 if *version {
Note:
See TracChangeset
for help on using the changeset viewer.