mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix: RESTful API sniffingEnable
This commit is contained in:
parent
9f2fb858c3
commit
cb1d5baf0e
|
@ -31,7 +31,7 @@ var (
|
|||
proxies = make(map[string]C.Proxy)
|
||||
providers map[string]provider.ProxyProvider
|
||||
ruleProviders map[string]provider.RuleProvider
|
||||
sniffingEnable bool
|
||||
sniffingEnable = false
|
||||
configMux sync.RWMutex
|
||||
|
||||
// Outbound Rule
|
||||
|
@ -108,7 +108,7 @@ func UpdateProxies(newProxies map[string]C.Proxy, newProviders map[string]provid
|
|||
func UpdateSniffer(dispatcher *sniffer.SnifferDispatcher) {
|
||||
configMux.Lock()
|
||||
sniffer.Dispatcher = dispatcher
|
||||
sniffingEnable = true
|
||||
sniffingEnable = dispatcher.Enable()
|
||||
configMux.Unlock()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user