mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
Fix Simplified Router Bug in Processing Rules
This commit is contained in:
parent
010aa3a103
commit
dae391fa41
@ -223,7 +223,7 @@ func init() {
|
||||
rule.Domain = append(rule.Domain, geo.Domain...)
|
||||
}
|
||||
}
|
||||
{
|
||||
if v.PortList != "" {
|
||||
portList := &cfgcommon.PortList{}
|
||||
err := portList.UnmarshalText(v.PortList)
|
||||
if err != nil {
|
||||
@ -231,7 +231,7 @@ func init() {
|
||||
}
|
||||
rule.PortList = portList.Build()
|
||||
}
|
||||
{
|
||||
if v.SourcePortList != "" {
|
||||
portList := &cfgcommon.PortList{}
|
||||
err := portList.UnmarshalText(v.SourcePortList)
|
||||
if err != nil {
|
||||
@ -240,12 +240,21 @@ func init() {
|
||||
rule.SourcePortList = portList.Build()
|
||||
}
|
||||
rule.Domain = v.Domain
|
||||
rule.Networks = net.ParseNetworks(v.Networks)
|
||||
if v.Networks != "" {
|
||||
rule.Networks = net.ParseNetworks(v.Networks)
|
||||
}
|
||||
rule.Protocol = v.Protocol
|
||||
rule.Attributes = v.Attributes
|
||||
rule.UserEmail = v.UserEmail
|
||||
rule.InboundTag = v.InboundTag
|
||||
rule.DomainMatcher = v.DomainMatcher
|
||||
switch s := v.TargetTag.(type) {
|
||||
case *SimplifiedRoutingRule_Tag:
|
||||
rule.TargetTag = &RoutingRule_Tag{s.Tag}
|
||||
case *SimplifiedRoutingRule_BalancingTag:
|
||||
rule.TargetTag = &RoutingRule_BalancingTag{s.BalancingTag}
|
||||
}
|
||||
routingRules = append(routingRules, rule)
|
||||
}
|
||||
|
||||
fullConfig := &Config{
|
||||
|
Loading…
Reference in New Issue
Block a user