mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-18 22:29:49 +03:00
Merge branch 'main' into dns
This commit is contained in:
@ -98,6 +98,8 @@ type RouterRule struct {
|
||||
Type string `json:"type"`
|
||||
OutboundTag string `json:"outboundTag"`
|
||||
BalancerTag string `json:"balancerTag"`
|
||||
|
||||
DomainMatcher string `json:"domainMatcher"`
|
||||
}
|
||||
|
||||
func ParseIP(s string) (*router.CIDR, error) {
|
||||
@ -491,6 +493,10 @@ func parseFieldRule(msg json.RawMessage) (*router.RoutingRule, error) {
|
||||
return nil, newError("neither outboundTag nor balancerTag is specified in routing rule")
|
||||
}
|
||||
|
||||
if rawFieldRule.DomainMatcher != "" {
|
||||
rule.DomainMatcher = rawFieldRule.DomainMatcher
|
||||
}
|
||||
|
||||
if rawFieldRule.Domain != nil {
|
||||
for _, domain := range *rawFieldRule.Domain {
|
||||
rules, err := parseDomainRule(domain)
|
||||
|
Reference in New Issue
Block a user