@ -70,18 +72,18 @@ var upFlagSet = (func() *flag.FlagSet {
upf.StringVar(&upArgs.hostname,"hostname","","hostname to use instead of the one provided by the OS")
upf.StringVar(&upArgs.hostname,"hostname","","hostname to use instead of the one provided by the OS")
upf.StringVar(&upArgs.advertiseRoutes,"advertise-routes","","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\")")
upf.StringVar(&upArgs.advertiseRoutes,"advertise-routes","","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\")")
upf.BoolVar(&upArgs.advertiseDefaultRoute,"advertise-exit-node",false,"offer to be an exit node for internet traffic for the tailnet")
upf.BoolVar(&upArgs.advertiseDefaultRoute,"advertise-exit-node",false,"offer to be an exit node for internet traffic for the tailnet")
ifsafesocket.PlatformUsesPeerCreds(){
ifsafesocket.GOOSUsesPeerCreds(goos){
upf.StringVar(&upArgs.opUser,"operator","","Unix username to allow to operate on tailscaled without sudo")
upf.StringVar(&upArgs.opUser,"operator","","Unix username to allow to operate on tailscaled without sudo")
}
}
ifruntime.GOOS=="linux"{
switchgoos{
case"linux":
upf.BoolVar(&upArgs.snat,"snat-subnet-routes",true,"source NAT traffic to local routes advertised with --advertise-routes")
upf.BoolVar(&upArgs.snat,"snat-subnet-routes",true,"source NAT traffic to local routes advertised with --advertise-routes")
upf.StringVar(&upArgs.netfilterMode,"netfilter-mode",defaultNetfilterMode(),"netfilter mode (one of on, nodivert, off)")
upf.StringVar(&upArgs.netfilterMode,"netfilter-mode",defaultNetfilterMode(),"netfilter mode (one of on, nodivert, off)")
}
case"windows":
ifruntime.GOOS=="windows"{
upf.BoolVar(&upArgs.forceDaemon,"unattended",false,"run in \"Unattended Mode\" where Tailscale keeps running even after the current GUI user logs out (Windows-only)")
upf.BoolVar(&upArgs.forceDaemon,"unattended",false,"run in \"Unattended Mode\" where Tailscale keeps running even after the current GUI user logs out (Windows-only)")