mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 13:41:23 +08:00
Fix: remove trim source ipcidr
This commit is contained in:
parent
b23bc77001
commit
fb836fe441
@ -3,7 +3,6 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
|
||||||
|
|
||||||
C "github.com/Dreamacro/clash/constant"
|
C "github.com/Dreamacro/clash/constant"
|
||||||
)
|
)
|
||||||
@ -16,7 +15,6 @@ var (
|
|||||||
|
|
||||||
func HasNoResolve(params []string) bool {
|
func HasNoResolve(params []string) bool {
|
||||||
for _, p := range params {
|
for _, p := range params {
|
||||||
p = strings.Trim(p, " ")
|
|
||||||
if p == noResolve {
|
if p == noResolve {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -26,7 +24,6 @@ func HasNoResolve(params []string) bool {
|
|||||||
|
|
||||||
func findNetwork(params []string) C.NetWork {
|
func findNetwork(params []string) C.NetWork {
|
||||||
for _, p := range params {
|
for _, p := range params {
|
||||||
p = strings.Trim(p, " ")
|
|
||||||
if p == "tcp" {
|
if p == "tcp" {
|
||||||
return C.TCP
|
return C.TCP
|
||||||
} else if p == "udp" {
|
} else if p == "udp" {
|
||||||
@ -39,7 +36,6 @@ func findNetwork(params []string) C.NetWork {
|
|||||||
func findSourceIPs(params []string) []*net.IPNet {
|
func findSourceIPs(params []string) []*net.IPNet {
|
||||||
var ips []*net.IPNet
|
var ips []*net.IPNet
|
||||||
for _, p := range params {
|
for _, p := range params {
|
||||||
p = strings.Trim(p, " ")
|
|
||||||
if p == noResolve || len(p) < 7 {
|
if p == noResolve || len(p) < 7 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user