Add dual-stack iptables manager with ip6tables support

This commit is contained in:
Viktor Liu
2026-03-24 12:06:58 +01:00
parent 571527c2d3
commit b6bd2d667b
25 changed files with 491 additions and 125 deletions

View File

@@ -9,6 +9,7 @@ import (
"fmt"
"html/template"
"maps"
"net"
"net/http"
"slices"
"strconv"
@@ -528,7 +529,7 @@ func (h *Handler) handlePingTCP(w http.ResponseWriter, r *http.Request, accountI
ctx, cancel := context.WithTimeout(r.Context(), timeout)
defer cancel()
address := fmt.Sprintf("%s:%d", host, port)
address := net.JoinHostPort(host, strconv.Itoa(port))
start := time.Now()
conn, err := client.Dial(ctx, "tcp", address)