mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
fix: some ipv6 inbounds has no routing in some cases
This commit is contained in:
1 parent
310db4ff68
commit
e20647954a
1 file changed
+3
-2
@@ -906,12 +906,13 @@ func (t *Template) setDualStack(setting *configure.Setting) {
|
||||
for i := range t.Routing.Rules {
|
||||
tag6 := make([]string, 0)
|
||||
for j, tag := range t.Routing.Rules[i].InboundTag {
|
||||
tag := strings.TrimSuffix(tag, tag4Suffix)
|
||||
if _, ok := tagMap[tag]; ok {
|
||||
t.Routing.Rules[i].InboundTag[j] += tag4Suffix
|
||||
t.Routing.Rules[i].InboundTag[j] = tag + tag4Suffix
|
||||
tag6 = append(tag6, tag+tag6Suffix)
|
||||
}
|
||||
}
|
||||
if len(tag6) > 0 && iptables.IsIPv6Supported() {
|
||||
if v6supported := iptables.IsIPv6Supported(); len(tag6) > 0 && v6supported {
|
||||
t.Routing.Rules[i].InboundTag = append(t.Routing.Rules[i].InboundTag, tag6...)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user