Feature: resolve ip with proxy adapter

This commit is contained in:
yaling888
2021-11-09 19:44:16 +08:00
parent 53287d597b
commit 4c6bb7178b
19 changed files with 328 additions and 126 deletions

View File

@ -1,7 +1,5 @@
package constant
import "net"
// Rule Type
const (
Domain RuleType = iota
@ -59,5 +57,3 @@ type Rule interface {
ShouldResolveIP() bool
RuleExtra() *RuleExtra
}
var TunBroadcastAddr = net.IPv4(198, 18, 255, 255)

View File

@ -1,6 +1,12 @@
package constant
import "net"
import (
"net"
"github.com/Dreamacro/clash/component/geodata/router"
)
var TunBroadcastAddr = net.IPv4(198, 18, 255, 255)
type RuleExtra struct {
Network NetWork
@ -23,3 +29,7 @@ func (re *RuleExtra) NotMatchSourceIP(srcIP net.IP) bool {
}
return true
}
type RuleGeoSite interface {
GetDomainMatcher() *router.DomainMatcher
}