mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-12-21 17:50:06 +08:00
fix: miss config in patch
This commit is contained in:
parent
5b975275f5
commit
765cbbcc01
@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/metacubex/mihomo/adapter/inbound"
|
"github.com/metacubex/mihomo/adapter/inbound"
|
||||||
"github.com/metacubex/mihomo/component/dialer"
|
"github.com/metacubex/mihomo/component/dialer"
|
||||||
|
"github.com/metacubex/mihomo/component/process"
|
||||||
"github.com/metacubex/mihomo/component/resolver"
|
"github.com/metacubex/mihomo/component/resolver"
|
||||||
"github.com/metacubex/mihomo/component/updater"
|
"github.com/metacubex/mihomo/component/updater"
|
||||||
"github.com/metacubex/mihomo/config"
|
"github.com/metacubex/mihomo/config"
|
||||||
@ -54,6 +55,7 @@ type configSchema struct {
|
|||||||
IPv6 *bool `json:"ipv6"`
|
IPv6 *bool `json:"ipv6"`
|
||||||
Sniffing *bool `json:"sniffing"`
|
Sniffing *bool `json:"sniffing"`
|
||||||
TcpConcurrent *bool `json:"tcp-concurrent"`
|
TcpConcurrent *bool `json:"tcp-concurrent"`
|
||||||
|
FindProcessMode *process.FindProcessMode `json:"find-process-mode"`
|
||||||
InterfaceName *string `json:"interface-name"`
|
InterfaceName *string `json:"interface-name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,6 +343,10 @@ func patchConfigs(w http.ResponseWriter, r *http.Request) {
|
|||||||
tunnel.SetMode(*general.Mode)
|
tunnel.SetMode(*general.Mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if general.FindProcessMode != nil {
|
||||||
|
tunnel.SetFindProcessMode(*general.FindProcessMode)
|
||||||
|
}
|
||||||
|
|
||||||
if general.LogLevel != nil {
|
if general.LogLevel != nil {
|
||||||
log.SetLevel(*general.LogLevel)
|
log.SetLevel(*general.LogLevel)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user