Feature: resolve ip with a proxy adapter

This commit is contained in:
yaling888
2022-02-23 02:38:50 +08:00
parent b192238699
commit d876d6e74c
14 changed files with 357 additions and 101 deletions

View File

@ -1,7 +1,5 @@
package constant
import "net"
// Rule Type
const (
Domain RuleType = iota
@ -56,5 +54,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
}