You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/derper/derper.go
+16-10Lines changed: 16 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -36,19 +36,21 @@ import (
36
36
"tailscale.com/tsweb"
37
37
"tailscale.com/types/key"
38
38
"tailscale.com/types/logger"
39
+
"tailscale.com/version"
39
40
)
40
41
41
42
var (
42
-
dev=flag.Bool("dev", false, "run in localhost development mode (overrides -a)")
43
-
addr=flag.String("a", ":443", "server HTTP/HTTPS listen address, in form \":port\", \"ip:port\", or for IPv6 \"[ip]:port\". If the IP is omitted, it defaults to all interfaces. Serves HTTPS if the port is 443 and/or -certmode is manual, otherwise HTTP.")
44
-
httpPort=flag.Int("http-port", 80, "The port on which to serve HTTP. Set to -1 to disable. The listener is bound to the same IP (if any) as specified in the -a flag.")
45
-
stunPort=flag.Int("stun-port", 3478, "The UDP port on which to serve STUN. The listener is bound to the same IP (if any) as specified in the -a flag.")
certMode=flag.String("certmode", "letsencrypt", "mode for getting a cert. possible options: manual, letsencrypt")
48
-
certDir=flag.String("certdir", tsweb.DefaultCertDir("derper-certs"), "directory to store LetsEncrypt certs, if addr's port is :443")
49
-
hostname=flag.String("hostname", "derp.tailscale.com", "LetsEncrypt host name, if addr's port is :443")
50
-
runSTUN=flag.Bool("stun", true, "whether to run a STUN server. It will bind to the same IP (if any) as the --addr flag value.")
51
-
runDERP=flag.Bool("derp", true, "whether to run a DERP server. The only reason to set this false is if you're decommissioning a server but want to keep its bootstrap DNS functionality still running.")
43
+
dev=flag.Bool("dev", false, "run in localhost development mode (overrides -a)")
44
+
versionFlag=flag.Bool("version", false, "print version and exit")
45
+
addr=flag.String("a", ":443", "server HTTP/HTTPS listen address, in form \":port\", \"ip:port\", or for IPv6 \"[ip]:port\". If the IP is omitted, it defaults to all interfaces. Serves HTTPS if the port is 443 and/or -certmode is manual, otherwise HTTP.")
46
+
httpPort=flag.Int("http-port", 80, "The port on which to serve HTTP. Set to -1 to disable. The listener is bound to the same IP (if any) as specified in the -a flag.")
47
+
stunPort=flag.Int("stun-port", 3478, "The UDP port on which to serve STUN. The listener is bound to the same IP (if any) as specified in the -a flag.")
certMode=flag.String("certmode", "letsencrypt", "mode for getting a cert. possible options: manual, letsencrypt")
50
+
certDir=flag.String("certdir", tsweb.DefaultCertDir("derper-certs"), "directory to store LetsEncrypt certs, if addr's port is :443")
51
+
hostname=flag.String("hostname", "derp.tailscale.com", "LetsEncrypt host name, if addr's port is :443")
52
+
runSTUN=flag.Bool("stun", true, "whether to run a STUN server. It will bind to the same IP (if any) as the --addr flag value.")
53
+
runDERP=flag.Bool("derp", true, "whether to run a DERP server. The only reason to set this false is if you're decommissioning a server but want to keep its bootstrap DNS functionality still running.")
52
54
53
55
meshPSKFile=flag.String("mesh-psk-file", defaultMeshPSKFile(), "if non-empty, path to file containing the mesh pre-shared key file. It should contain some hex string; whitespace is trimmed.")
54
56
meshWith=flag.String("mesh-with", "", "optional comma-separated list of hostnames to mesh with; the server's own hostname can be in the list")
0 commit comments