From 42fec28a0e6cb1b0a56e52f2c5da5877b63894cf Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 14 Jan 2025 01:20:17 +0900 Subject: [PATCH] added SvcPermNet to ServerRouteProxyInfo --- server-ctl.go | 1 + server-proxy.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/server-ctl.go b/server-ctl.go index eef105a..2c8c4c7 100644 --- a/server-ctl.go +++ b/server-ctl.go @@ -293,6 +293,7 @@ func (ctl *server_ctl_server_conns_id_routes_id) ServeHTTP(w http.ResponseWriter PtcName: pi.PtcName, PtcAddr: pi.PtcAddr, SvcAddr: pi.SvcAddr, + SvcPermNet: pi.SvcPermNet, } } } diff --git a/server-proxy.go b/server-proxy.go index b2c71de..9084728 100644 --- a/server-proxy.go +++ b/server-proxy.go @@ -9,6 +9,7 @@ import "fmt" import "io" import "net" import "net/http" +import "net/netip" import "net/url" import "strconv" import "strings" @@ -54,6 +55,7 @@ type ServerRouteProxyInfo struct { PtcAddr string PtcName string SvcAddr *net.TCPAddr + SvcPermNet netip.Prefix PathPrefix string ConnId string @@ -230,6 +232,7 @@ func (pxy *server_proxy_http_main) get_route(req *http.Request, in_wpx_mode bool PtcAddr: r.PtcAddr, PtcName: r.PtcName, SvcAddr: r.SvcAddr, + SvcPermNet: r.SvcPermNet, PathPrefix: path_prefix, ConnId: conn_id, RouteId: route_id, @@ -674,6 +677,7 @@ func (pxy *server_proxy_ssh_ws) ServeWebsocket(ws *websocket.Conn) { PtcName: pi.PtcName, PtcAddr: pi.PtcAddr, SvcAddr: pi.SvcAddr, + SvcPermNet: pi.SvcPermNet, } } if err != nil {