mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
parent
f49a3d103f
commit
4e0659ac04
|
@ -20,14 +20,13 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
tcpQueue = make(chan C.ConnContext, 200)
|
||||
udpQueue = make(chan *inbound.PacketAdapter, 200)
|
||||
natTable = nat.New()
|
||||
rules []C.Rule
|
||||
proxies = make(map[string]C.Proxy)
|
||||
providers map[string]provider.ProxyProvider
|
||||
ruleProviders map[string]provider.RuleProvider
|
||||
configMux sync.RWMutex
|
||||
tcpQueue = make(chan C.ConnContext, 200)
|
||||
udpQueue = make(chan *inbound.PacketAdapter, 200)
|
||||
natTable = nat.New()
|
||||
rules []C.Rule
|
||||
proxies = make(map[string]C.Proxy)
|
||||
providers map[string]provider.ProxyProvider
|
||||
configMux sync.RWMutex
|
||||
|
||||
// Outbound Rule
|
||||
mode = Rule
|
||||
|
@ -58,10 +57,9 @@ func Rules() []C.Rule {
|
|||
}
|
||||
|
||||
// UpdateRules handle update rules
|
||||
func UpdateRules(newRules []C.Rule, rp map[string]provider.RuleProvider) {
|
||||
func UpdateRules(newRules []C.Rule) {
|
||||
configMux.Lock()
|
||||
rules = newRules
|
||||
ruleProviders = rp
|
||||
configMux.Unlock()
|
||||
}
|
||||
|
||||
|
@ -75,10 +73,6 @@ func Providers() map[string]provider.ProxyProvider {
|
|||
return providers
|
||||
}
|
||||
|
||||
func RuleProviders() map[string]provider.RuleProvider {
|
||||
return ruleProviders
|
||||
}
|
||||
|
||||
// UpdateProxies handle update proxies
|
||||
func UpdateProxies(newProxies map[string]C.Proxy, newProviders map[string]provider.ProxyProvider) {
|
||||
configMux.Lock()
|
||||
|
|
Loading…
Reference in New Issue
Block a user