// Try TUN, but fall back to userspace networking if needed.
// Try TUN, but fall back to userspace networking if needed.
// See https://github.com/tailscale/tailscale-synology/issues/35
// See https://github.com/tailscale/tailscale-synology/issues/35
return"tailscale0,userspace-networking"
return"tailscale0,userspace-networking"
}
}
}
}
return"tailscale0"
return"tailscale0"
}
}
@ -195,10 +193,14 @@ func main() {
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())
ifbuildfeatures.HasTPM{
flag.Var(&args.encryptState,"encrypt-state",`encrypt the state file on disk; when not set encryption will be enabled if supported on this platform; uses TPM on Linux and Windows, on all other platforms this flag is not supported`)
flag.Var(&args.encryptState,"encrypt-state",`encrypt the state file on disk; when not set encryption will be enabled if supported on this platform; uses TPM on Linux and Windows, on all other platforms this flag is not supported`)
}
flag.StringVar(&args.statedir,"statedir","","path to directory for storage of config state, TLS certs, temporary incoming Taildrop files, etc. If empty, it's derived from --state when possible.")
flag.StringVar(&args.statedir,"statedir","","path to directory for storage of config state, TLS certs, temporary incoming Taildrop files, etc. If empty, it's derived from --state when possible.")
flag.StringVar(&args.socketpath,"socket",paths.DefaultTailscaledSocket(),"path of the service unix socket")
flag.StringVar(&args.socketpath,"socket",paths.DefaultTailscaledSocket(),"path of the service unix socket")
ifbuildfeatures.HasBird{
flag.StringVar(&args.birdSocketPath,"bird-socket","","path of the bird unix socket")
flag.StringVar(&args.birdSocketPath,"bird-socket","","path of the bird unix socket")
}
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)")
@ -252,7 +254,7 @@ func main() {
log.Fatalf("--socket is required")
log.Fatalf("--socket is required")
}
}
if args.birdSocketPath!=""&&createBIRDClient==nil{