From 508e257543b30cfb25cac3b0be2fb59eaeed71b8 Mon Sep 17 00:00:00 2001 From: adlyq Date: Thu, 3 Nov 2022 00:31:31 +0800 Subject: [PATCH] fix: RESTful API sniffingEnable --- tunnel/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index d9513e01..760fa103 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -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() }