From 553f657248e10c81004520791a5d9f24db2980d1 Mon Sep 17 00:00:00 2001 From: Simon Leonhardt Date: Sun, 8 Oct 2023 17:26:48 +0000 Subject: [PATCH] sniproxy allows configuration of hostname Signed-off-by: Simon Leonhardt --- cmd/sniproxy/sniproxy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/sniproxy/sniproxy.go b/cmd/sniproxy/sniproxy.go index 6a410418d..5be6e5afe 100644 --- a/cmd/sniproxy/sniproxy.go +++ b/cmd/sniproxy/sniproxy.go @@ -75,6 +75,7 @@ func main() { wgPort = fs.Int("wg-listen-port", 0, "UDP port to listen on for WireGuard and peer-to-peer traffic; 0 means automatically select") promoteHTTPS = fs.Bool("promote-https", true, "promote HTTP to HTTPS") debugPort = fs.Int("debug-port", 8893, "Listening port for debug/metrics endpoint") + hostname = fs.String("hostname", "", "Hostname to register the service under") ) err := ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("TS_APPC")) @@ -89,6 +90,7 @@ func main() { var s server s.ts.Port = uint16(*wgPort) + s.ts.Hostname = *hostname defer s.ts.Close() lc, err := s.ts.LocalClient()