check: stop checking when protocol not supported

This commit is contained in:
nadoo committed 2020-11-26 19:21:27 +08:00
1 parent 6820644073
commit 98ce20b295
9 files changed
+69 -122

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ func NewProxy(mainForwarders []string, mainStrategy *Strategy, rules []*Config)
if len(mainForwarders) > 0 {
direct := NewFwdrGroup("", nil, mainStrategy)
for _, f := range rd.main.fwdrs {
host := strings.Split(f.addr, ":")[0]
host, _, _ := net.SplitHostPort(f.addr)
if ip := net.ParseIP(host); ip == nil {
rd.domainMap.Store(strings.ToLower(host), direct)
}