From fb836fe44118fa5a612f34286155d0f64c70daf8 Mon Sep 17 00:00:00 2001 From: yaling888 <73897884+yaling888@users.noreply.github.com> Date: Wed, 1 Sep 2021 01:02:42 +0800 Subject: [PATCH] Fix: remove trim source ipcidr --- rule/base.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rule/base.go b/rule/base.go index b44c6036d..96d8bfe57 100644 --- a/rule/base.go +++ b/rule/base.go @@ -3,7 +3,6 @@ package rules import ( "errors" "net" - "strings" C "github.com/Dreamacro/clash/constant" ) @@ -16,7 +15,6 @@ var ( func HasNoResolve(params []string) bool { for _, p := range params { - p = strings.Trim(p, " ") if p == noResolve { return true } @@ -26,7 +24,6 @@ func HasNoResolve(params []string) bool { func findNetwork(params []string) C.NetWork { for _, p := range params { - p = strings.Trim(p, " ") if p == "tcp" { return C.TCP } else if p == "udp" { @@ -39,7 +36,6 @@ func findNetwork(params []string) C.NetWork { func findSourceIPs(params []string) []*net.IPNet { var ips []*net.IPNet for _, p := range params { - p = strings.Trim(p, " ") if p == noResolve || len(p) < 7 { continue }