diff --git a/hub/route/configs.go b/hub/route/configs.go index f87fa5ce..82f65284 100644 --- a/hub/route/configs.go +++ b/hub/route/configs.go @@ -46,6 +46,7 @@ type configSchema struct { IPv6 *bool `json:"ipv6"` Sniffing *bool `json:"sniffing"` TcpConcurrent *bool `json:"tcp-concurrent"` + InterfaceName *string `json:"interface-name"` } func getConfigs(w http.ResponseWriter, r *http.Request) { @@ -85,6 +86,10 @@ func patchConfigs(w http.ResponseWriter, r *http.Request) { dialer.SetDial(*general.TcpConcurrent) } + if general.InterfaceName != nil { + dialer.DefaultInterface.Store(*general.InterfaceName) + } + ports := P.GetPorts() tcpIn := tunnel.TCPIn()