嗯,DERP服务器,不知道的同学就可以跳过本文了,知道的同学,那么是否好奇如何强制指定tailscale使用derp节点时,derp本身监听的端口和UDP通信端口呢?
通过随手翻的源码,记录翻译如下:
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.")
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.")
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.")
addr = flag.String("a", ":443", "DERP 服务监听的 HTTP/HTTPS 地址, in form \":port\", \"ip:port\", or for IPv6 \"[ip]:port\". 如果省略了IP,则默认为所有接口。如果端口为443和/或-certmode,则使用HTTPS,否则为HTTP。")
httpPort = flag.Int("http-port", 80, "将http。设置为-1的端口可禁用。侦听器绑定到与-a标志中指定的相同IP(如果有)。 ")
stunPort = flag.Int("stun-port", 3478, "在该端口上使用的UDP端口。听众绑定到-A标志中指定的同一IP(如果有的话)。")
参考资料
如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。
如本文对您有用,捐赠和留言 将是对我最好的支持~(捐赠可转为站内积分)
如愿意,请向朋友推荐本站,谢谢。
尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。