1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-01 01:59:07 -04:00

support range list in routing rule

This commit is contained in:
Darien Raymond
2019-02-24 23:43:00 +01:00
parent 4d23411d80
commit 95583b5031
11 changed files with 267 additions and 81 deletions

View File

@@ -177,12 +177,12 @@ func (m *MultiGeoIPMatcher) Apply(ctx context.Context) bool {
}
type PortMatcher struct {
port net.PortRange
port net.MemoryPortList
}
func NewPortMatcher(portRange net.PortRange) *PortMatcher {
func NewPortMatcher(list *net.PortList) *PortMatcher {
return &PortMatcher{
port: portRange,
port: net.PortListFromProto(list),
}
}