mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
fix: skip xdriod interfaces
This commit is contained in:
1 parent
73f4c45c9c
commit
ee71b5d769
2 files changed
+6
-2
No files matched your search
@@ -14,7 +14,7 @@ func (r *redirect) AddIPWhitelist(cidr string) {
|
||||
// avoid duplication
|
||||
r.RemoveIPWhitelist(cidr)
|
||||
var commands string
|
||||
commands = fmt.Sprintf(`iptables -w 2 -t nat -I V2RAY -d %s -j RETURN`, cidr)
|
||||
commands = fmt.Sprintf(`iptables -w 2 -t nat -I V2RAY 2 -d %s -j RETURN`, cidr)
|
||||
if !strings.Contains(cidr, ".") {
|
||||
//ipv6
|
||||
commands = strings.Replace(commands, "iptables", "ip6tables", 1)
|
||||
@@ -31,6 +31,7 @@ func (r *redirect) RemoveIPWhitelist(cidr string) {
|
||||
func (r *redirect) GetSetupCommands() SetupCommands {
|
||||
commands := `
|
||||
iptables -w 2 -t nat -N V2RAY
|
||||
iptables -w 2 -t nat -A V2RAY -i xdroid+ -j RETURN
|
||||
iptables -w 2 -t nat -A V2RAY -d 0.0.0.0/32 -j RETURN
|
||||
iptables -w 2 -t nat -A V2RAY -d 10.0.0.0/8 -j RETURN
|
||||
iptables -w 2 -t nat -A V2RAY -d 100.64.0.0/10 -j RETURN
|
||||
@@ -55,6 +56,7 @@ iptables -w 2 -t nat -I OUTPUT -p tcp -j V2RAY
|
||||
if IsIPv6Supported() {
|
||||
commands += `
|
||||
ip6tables -t nat -N V2RAY
|
||||
ip6tables -w 2 -t nat -A V2RAY -i xdroid+ -j RETURN
|
||||
ip6tables -w 2 -t nat -A V2RAY -d ::/128 -j RETURN
|
||||
ip6tables -w 2 -t nat -A V2RAY -d ::1/128 -j RETURN
|
||||
ip6tables -w 2 -t nat -A V2RAY -d 64:ff9b::/96 -j RETURN
|
||||
|
||||
@@ -16,7 +16,7 @@ var Tproxy tproxy
|
||||
func (t *tproxy) AddIPWhitelist(cidr string) {
|
||||
// avoid duplication
|
||||
t.RemoveIPWhitelist(cidr)
|
||||
pos := 5
|
||||
pos := 6
|
||||
if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
|
||||
pos += 3
|
||||
}
|
||||
@@ -66,6 +66,7 @@ iptables -w 2 -t mangle -A TP_PRE -p udp -m mark --mark 0x40/0xc0 -j TPROXY --on
|
||||
iptables -w 2 -t mangle -A TP_RULE -j CONNMARK --restore-mark
|
||||
iptables -w 2 -t mangle -A TP_RULE -m mark --mark 0x40/0xc0 -j RETURN
|
||||
iptables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
|
||||
iptables -w 2 -t mangle -A TP_RULE -i xdroid+ -j RETURN
|
||||
iptables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
|
||||
`
|
||||
if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
|
||||
@@ -123,6 +124,7 @@ ip6tables -w 2 -t mangle -A TP_PRE -p udp -m mark --mark 0x40/0xc0 -j TPROXY --o
|
||||
ip6tables -w 2 -t mangle -A TP_RULE -j CONNMARK --restore-mark
|
||||
ip6tables -w 2 -t mangle -A TP_RULE -m mark --mark 0x40/0xc0 -j RETURN
|
||||
ip6tables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
|
||||
ip6tables -w 2 -t mangle -A TP_RULE -i xdroid+ -j RETURN
|
||||
ip6tables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
|
||||
`
|
||||
if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
|
||||
|
||||
Reference in new issue
Block a user