feat: add domain list for sniffer, reverse force logic
when force is false, if domain in the list, will force replace when force is true, if sniff domain in the list, will skip it
This commit is contained in:
@ -91,6 +91,12 @@ func UpdateProxies(newProxies map[string]C.Proxy, newProviders map[string]provid
|
||||
configMux.Unlock()
|
||||
}
|
||||
|
||||
func UpdateSniffer(dispatcher *sniffer.SnifferDispatcher) {
|
||||
configMux.Lock()
|
||||
sniffer.Dispatcher = *dispatcher
|
||||
configMux.Unlock()
|
||||
}
|
||||
|
||||
// Mode return current mode
|
||||
func Mode() TunnelMode {
|
||||
return mode
|
||||
@ -300,7 +306,7 @@ func handleTCPConn(connCtx C.ConnContext) {
|
||||
}
|
||||
|
||||
if sniffer.Dispatcher.Enable() {
|
||||
sniffer.Dispatcher.Tcp(connCtx.Conn(), metadata)
|
||||
sniffer.Dispatcher.TCPSniff(connCtx.Conn(), metadata)
|
||||
}
|
||||
|
||||
proxy, rule, err := resolveMetadata(connCtx, metadata)
|
||||
|
Reference in New Issue
Block a user