From 0ec1b62626c46176b21b4412c66ec314741faa42 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Sun, 21 Aug 2022 13:15:26 +0800 Subject: [PATCH] fix: warning of sniff options --- cmd/config/decode.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/config/decode.go b/cmd/config/decode.go index 9a3ed1e..4e88223 100644 --- a/cmd/config/decode.go +++ b/cmd/config/decode.go @@ -101,6 +101,12 @@ func decodeProxy(rawConfig *RawConfig, config *Config) { if config.Proxy.Core != "xray" && config.Proxy.Core != "v2ray" && config.Proxy.Core != "sagray" { log.Warningf("Unknown core type -> %s", config.Proxy.Core) } + if config.Proxy.Core != "xray" && config.Proxy.Core != "sagray" && !config.Proxy.Sniff.Redirect { + log.Warningf("V2fly core couldn't disable redirect in sniff (aka `routeOnly` option)") + } + if config.Proxy.Core != "xray" && len(config.Proxy.Sniff.Exclude) != 0 { + log.Warningf("The exclude list in sniff options can only use for Xray-core") + } log.Debugf("Proxy log level -> %s", config.Proxy.Log) log.Debugf("Core type -> %s", config.Proxy.Core) log.Debugf("Http inbounds -> %v", config.Proxy.Http)