1 From ce463911b8b480363cdf2b55518e4e7ac85ca6d7 Mon Sep 17 00:00:00 2001
2 From: mzz2017 <mzz@tuta.io>
3 Date: Thu, 16 Dec 2021 23:44:07 +0800
4 Subject: [PATCH] fix: incorrect ipv6 routing. #329
7 service/core/v2ray/v2rayTmpl.go | 20 ++++++++++----------
8 1 file changed, 10 insertions(+), 10 deletions(-)
10 --- a/core/v2ray/v2rayTmpl.go
11 +++ b/core/v2ray/v2rayTmpl.go
12 @@ -516,7 +516,7 @@ func (t *Template) AppendRoutingRuleByMo
15 OutboundTag: firstOutboundTag,
16 - InboundTag: inbounds,
17 + InboundTag: deepcopy.Copy(inbounds).([]string),
18 Domain: []string{"ext:LoyalsoldierSite.dat:geolocation-!cn"},
21 @@ -524,7 +524,7 @@ func (t *Template) AppendRoutingRuleByMo
24 OutboundTag: firstOutboundTag,
25 - InboundTag: inbounds,
26 + InboundTag: deepcopy.Copy(inbounds).([]string),
27 Domain: []string{"geosite:geolocation-!cn"},
30 @@ -532,19 +532,19 @@ func (t *Template) AppendRoutingRuleByMo
33 OutboundTag: "direct",
34 - InboundTag: inbounds,
35 + InboundTag: deepcopy.Copy(inbounds).([]string),
36 Domain: []string{"geosite:cn"},
41 - InboundTag: inbounds,
42 + InboundTag: deepcopy.Copy(inbounds).([]string),
43 IP: []string{"geoip:hk", "geoip:mo"},
47 OutboundTag: "direct",
48 - InboundTag: inbounds,
49 + InboundTag: deepcopy.Copy(inbounds).([]string),
50 IP: []string{"geoip:private", "geoip:cn"},
53 @@ -554,13 +554,13 @@ func (t *Template) AppendRoutingRuleByMo
56 OutboundTag: firstOutboundTag,
57 - InboundTag: inbounds,
58 + InboundTag: deepcopy.Copy(inbounds).([]string),
59 Domain: []string{"ext:LoyalsoldierSite.dat:gfw"},
63 OutboundTag: firstOutboundTag,
64 - InboundTag: inbounds,
65 + InboundTag: deepcopy.Copy(inbounds).([]string),
66 Domain: []string{"ext:LoyalsoldierSite.dat:greatfire"},
69 @@ -568,7 +568,7 @@ func (t *Template) AppendRoutingRuleByMo
72 OutboundTag: firstOutboundTag,
73 - InboundTag: inbounds,
74 + InboundTag: deepcopy.Copy(inbounds).([]string),
75 Domain: []string{"geosite:geolocation-!cn"},
78 @@ -576,11 +576,11 @@ func (t *Template) AppendRoutingRuleByMo
81 OutboundTag: "direct",
82 - InboundTag: inbounds,
83 + InboundTag: deepcopy.Copy(inbounds).([]string),
86 case configure.RoutingAMode:
87 - if err := parseRoutingA(t, inbounds); err != nil {
88 + if err := parseRoutingA(t, deepcopy.Copy(inbounds).([]string)); err != nil {