Add IPv6 overlay address support to client interface and engine

This commit is contained in:
Viktor Liu
2026-03-24 06:56:49 +01:00
parent 013770070a
commit b852ce1a99
60 changed files with 4077 additions and 1647 deletions

View File

@@ -5,6 +5,7 @@ package main
import (
"context"
"fmt"
"net"
"syscall/js"
"time"
@@ -81,6 +82,10 @@ func parseClientOptions(jsOptions js.Value) (netbird.Options, error) {
options.DeviceName = deviceName.String()
}
if disableIPv6 := jsOptions.Get("disableIPv6"); !disableIPv6.IsNull() && !disableIPv6.IsUndefined() {
options.DisableIPv6 = disableIPv6.Bool()
}
return options, nil
}
@@ -227,7 +232,7 @@ func performPingTCP(client *netbird.Client, hostname string, port int) {
ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
defer cancel()
address := fmt.Sprintf("%s:%d", hostname, port)
address := net.JoinHostPort(hostname, fmt.Sprintf("%d", port))
start := time.Now()
conn, err := client.Dial(ctx, "tcp", address)
if err != nil {