mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 12:42:27 +08:00
Fix: NoResolveIP should return current value (#390)
This commit is contained in:
parent
1948ea11ef
commit
e103040158
@ -472,7 +472,7 @@ func parseRules(cfg *rawConfig, proxies map[string]C.Proxy) ([]C.Rule, error) {
|
|||||||
case "SOURCE-IP-CIDR":
|
case "SOURCE-IP-CIDR":
|
||||||
fallthrough
|
fallthrough
|
||||||
case "SRC-IP-CIDR":
|
case "SRC-IP-CIDR":
|
||||||
parsed, parseErr = R.NewIPCIDR(payload, target, R.WithIPCIDRSourceIP(true))
|
parsed, parseErr = R.NewIPCIDR(payload, target, R.WithIPCIDRSourceIP(true), R.WithIPCIDRNoResolve(true))
|
||||||
case "SRC-PORT":
|
case "SRC-PORT":
|
||||||
parsed, parseErr = R.NewPort(payload, target, true)
|
parsed, parseErr = R.NewPort(payload, target, true)
|
||||||
case "DST-PORT":
|
case "DST-PORT":
|
||||||
|
@ -31,7 +31,7 @@ func (d *Domain) Payload() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) NoResolveIP() bool {
|
func (d *Domain) NoResolveIP() bool {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDomain(domain string, adapter string) *Domain {
|
func NewDomain(domain string, adapter string) *Domain {
|
||||||
|
@ -32,7 +32,7 @@ func (dk *DomainKeyword) Payload() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (dk *DomainKeyword) NoResolveIP() bool {
|
func (dk *DomainKeyword) NoResolveIP() bool {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDomainKeyword(keyword string, adapter string) *DomainKeyword {
|
func NewDomainKeyword(keyword string, adapter string) *DomainKeyword {
|
||||||
|
@ -32,7 +32,7 @@ func (ds *DomainSuffix) Payload() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ds *DomainSuffix) NoResolveIP() bool {
|
func (ds *DomainSuffix) NoResolveIP() bool {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDomainSuffix(suffix string, adapter string) *DomainSuffix {
|
func NewDomainSuffix(suffix string, adapter string) *DomainSuffix {
|
||||||
|
@ -25,7 +25,7 @@ func (f *Match) Payload() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *Match) NoResolveIP() bool {
|
func (f *Match) NoResolveIP() bool {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMatch(adapter string) *Match {
|
func NewMatch(adapter string) *Match {
|
||||||
|
@ -16,7 +16,7 @@ func WithIPCIDRSourceIP(b bool) IPCIDROption {
|
|||||||
|
|
||||||
func WithIPCIDRNoResolve(noResolve bool) IPCIDROption {
|
func WithIPCIDRNoResolve(noResolve bool) IPCIDROption {
|
||||||
return func(i *IPCIDR) {
|
return func(i *IPCIDR) {
|
||||||
i.noResolveIP = !noResolve
|
i.noResolveIP = noResolve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ func (p *Port) Payload() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Port) NoResolveIP() bool {
|
func (p *Port) NoResolveIP() bool {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPort(port string, adapter string, isSource bool) (*Port, error) {
|
func NewPort(port string, adapter string, isSource bool) (*Port, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user