Chore: move experimental features to stable

This commit is contained in:
Dreamacro
2020-06-27 14:19:31 +08:00
parent 14c9cf1b97
commit 2781090405
4 changed files with 22 additions and 44 deletions

View File

@ -28,9 +28,6 @@ var (
configMux sync.RWMutex
enhancedMode *dns.Resolver
// experimental features
ignoreResolveFail bool
// Outbound Rule
mode = Rule
@ -82,13 +79,6 @@ func UpdateProxies(newProxies map[string]C.Proxy, newProviders map[string]provid
configMux.Unlock()
}
// UpdateExperimental handle update experimental config
func UpdateExperimental(value bool) {
configMux.Lock()
ignoreResolveFail = value
configMux.Unlock()
}
// Mode return current mode
func Mode() TunnelMode {
return mode
@ -318,9 +308,6 @@ func match(metadata *C.Metadata) (C.Proxy, C.Rule, error) {
if !resolved && shouldResolveIP(rule, metadata) {
ip, err := resolver.ResolveIP(metadata.Host)
if err != nil {
if !ignoreResolveFail {
return nil, nil, fmt.Errorf("[DNS] resolve %s error: %s", metadata.Host, err.Error())
}
log.Debugln("[DNS] resolve %s error: %s", metadata.Host, err.Error())
} else {
log.Debugln("[DNS] %s --> %s", metadata.Host, ip.String())