flag.IntVar(&args.verbose,"verbose",defaultVerbosity(),"log verbosity level; 0 is default, 1 or higher are increasingly verbose")
flag.IntVar(&args.verbose,"verbose",defaultVerbosity(),"log verbosity level; 0 is default, 1 or higher are increasingly verbose")
flag.BoolVar(&args.cleanUp,"cleanup",false,"clean up system state and exit")
flag.BoolVar(&args.cleanUp,"cleanup",false,"clean up system state and exit")
flag.StringVar(&args.debug,"debug","","listen address ([ip]:port) of optional debug server")
flag.StringVar(&args.debug,"debug","","listen address ([ip]:port) of optional debug server")
flag.StringVar(&args.socksAddr,"socks5-server","",`optional [ip]:port to run a SOCK5 server (e.g. "localhost:1080")`)
flag.StringVar(&args.httpProxyAddr,"outbound-http-proxy-listen","",`optional [ip]:port to run an outbound HTTP proxy (e.g. "localhost:8080")`)
flag.StringVar(&args.tunname,"tun",defaultTunName(),`tunnel interface name; use "userspace-networking" (beta) to not use TUN`)
flag.StringVar(&args.tunname,"tun",defaultTunName(),`tunnel interface name; use "userspace-networking" (beta) to not use TUN`)
flag.Var(flagtype.PortValue(&args.port,defaultPort()),"port","UDP port to listen on for WireGuard and peer-to-peer traffic; 0 means automatically select")
flag.Var(flagtype.PortValue(&args.port,defaultPort()),"port","UDP port to listen on for WireGuard and peer-to-peer traffic; 0 means automatically select")
flag.StringVar(&args.statepath,"state","","absolute path of state file; use 'kube:<secret-name>' to use Kubernetes secrets or 'arn:aws:ssm:...' to store in AWS SSM; use 'mem:' to not store state and register as an ephemeral node. If empty and --statedir is provided, the default is <statedir>/tailscaled.state. Default: "+paths.DefaultTailscaledStateFile())
flag.StringVar(&args.statepath,"state","","absolute path of state file; use 'kube:<secret-name>' to use Kubernetes secrets or 'arn:aws:ssm:...' to store in AWS SSM; use 'mem:' to not store state and register as an ephemeral node. If empty and --statedir is provided, the default is <statedir>/tailscaled.state. Default: "+paths.DefaultTailscaledStateFile())
@ -202,6 +208,9 @@ func main() {
flag.BoolVar(&printVersion,"version",false,"print version information and exit")
flag.BoolVar(&printVersion,"version",false,"print version information and exit")
flag.BoolVar(&args.disableLogs,"no-logs-no-support",false,"disable log uploads; this also disables any technical support")
flag.BoolVar(&args.disableLogs,"no-logs-no-support",false,"disable log uploads; this also disables any technical support")
flag.StringVar(&args.confFile,"config","","path to config file, or 'vm:user-data' to use the VM's user-data (EC2)")
flag.StringVar(&args.confFile,"config","","path to config file, or 'vm:user-data' to use the VM's user-data (EC2)")
// HasNetstack is whether the binary was built with support for modular feature "gVisor netstack (userspace networking) support (TODO; not yet omittable)".
// Specifically, it's whether the binary was NOT built with the "ts_omit_netstack" build tag.
// It's a const so it can be used for dead code elimination.
// HasNetstack is whether the binary was built with support for modular feature "gVisor netstack (userspace networking) support (TODO; not yet omittable)".
// Specifically, it's whether the binary was NOT built with the "ts_omit_netstack" build tag.
// It's a const so it can be used for dead code elimination.