From d240aa19d895910a85bd5d5d2bfc92cae4e98396 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Wed, 2 Oct 2024 10:30:59 -0400 Subject: [PATCH] fix: do not set the host address (#217) --- cmd/outline-ss-server/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/outline-ss-server/main.go b/cmd/outline-ss-server/main.go index c2704c1f..3a04af0b 100644 --- a/cmd/outline-ss-server/main.go +++ b/cmd/outline-ss-server/main.go @@ -23,7 +23,6 @@ import ( "net/http" "os" "os/signal" - "strconv" "sync" "syscall" "time" @@ -212,7 +211,10 @@ func (s *OutlineServer) runConfig(config Config) (func() error, error) { cipherList.PushBack(&entry) } for portNum, cipherList := range portCiphers { - addr := net.JoinHostPort("::", strconv.Itoa(portNum)) + // NOTE: We explicitly construct the address string with only the port + // number. This will result in an address that listens on all available + // network interfaces (both IPv4 and IPv6). + addr := fmt.Sprintf(":%d", portNum) ciphers := service.NewCipherList() ciphers.Update(cipherList)