mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-14 21:31:16 +08:00
feat: RESTful api add interface-name field on patch config
This commit is contained in:
parent
54a0947bb4
commit
21098d2627
@ -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 New Issue
Block a user