@@ -12,6 +12,7 @@ import (
1212 "os"
1313 "os/signal"
1414 "runtime"
15+ "strings"
1516 "syscall"
1617 "time"
1718
@@ -58,7 +59,9 @@ func main() {
5859 // print configuration
5960 slog .Info ("starting socket-proxy" , "version" , version , "os" , runtime .GOOS , "arch" , runtime .GOARCH , "runtime" , runtime .Version (), "URL" , programURL )
6061 if cfg .ProxySocketEndpoint == "" {
61- slog .Info ("configuration info" , "socketpath" , cfg .SocketPath , "listenaddress" , cfg .ListenAddress , "loglevel" , cfg .LogLevel , "logjson" , cfg .LogJSON , "allowfrom" , cfg .AllowFrom , "shutdowngracetime" , cfg .ShutdownGraceTime )
62+ // join the cfg.AllowFrom slice to a string to avoid the brackets in the logging (avoid confusion with IPv6 addresses)
63+ allowFromString := strings .Join (cfg .AllowFrom , "," )
64+ slog .Info ("configuration info" , "socketpath" , cfg .SocketPath , "listenaddress" , cfg .ListenAddress , "loglevel" , cfg .LogLevel , "logjson" , cfg .LogJSON , "allowfrom" , allowFromString , "shutdowngracetime" , cfg .ShutdownGraceTime )
6265 } else {
6366 slog .Info ("configuration info" , "socketpath" , cfg .SocketPath , "proxysocketendpoint" , cfg .ProxySocketEndpoint , "proxysocketendpointfilemode" , cfg .ProxySocketEndpointFileMode , "loglevel" , cfg .LogLevel , "logjson" , cfg .LogJSON , "shutdowngracetime" , cfg .ShutdownGraceTime )
6467 slog .Info ("proxysocketendpoint is set, so the TCP listener is deactivated" )
0 commit comments