feat: RESTful api add interface-name field on patch config
This commit is contained in:
parent
54a0947bb4
commit
21098d2627
1 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue