Support IPv6 for the embedded VNC server and browser proxy

This commit is contained in:
Viktor Liu
2026-07-12 18:46:47 +02:00
parent 6c3dac6fa0
commit 4b946ec219
10 changed files with 183 additions and 63 deletions
+2 -7
View File
@@ -15,6 +15,7 @@ import (
netbird "github.com/netbirdio/netbird/client/embed"
nbssh "github.com/netbirdio/netbird/client/ssh"
"github.com/netbirdio/netbird/client/wasm/internal/netutil"
)
const (
@@ -64,13 +65,7 @@ func (c *Client) Connect(host string, port int, username, jwtToken string, ipVer
Timeout: sshDialTimeout,
}
network := "tcp"
switch ipVersion {
case 4:
network = "tcp4"
case 6:
network = "tcp6"
}
network := netutil.TCPNetwork(ipVersion)
ctx, cancel := context.WithTimeout(context.Background(), sshDialTimeout)
defer cancel()