[client] Add rootless container and fix client routes in netstack mode (#3150)

This commit is contained in:
Viktor Liu
2025-01-06 14:16:31 +01:00
committed by GitHub
parent 668aead4c8
commit 6848e1e128
5 changed files with 116 additions and 12 deletions

View File

@ -15,6 +15,10 @@ func IsEnabled() bool {
func ListenAddr() string {
sPort := os.Getenv("NB_SOCKS5_LISTENER_PORT")
if sPort == "" {
return listenAddr(DefaultSocks5Port)
}
port, err := strconv.Atoi(sPort)
if err != nil {
log.Warnf("invalid socks5 listener port, unable to convert it to int, falling back to default: %d", DefaultSocks5Port)