openwrt_helloworld/v2raya/patches/013-fix-we-should-skip-interface-ppp-to-avoid-to-break-net.patch
Tianling Shen df434fb899 v2raya: drop wrong patches
These patches should not be backported to OpenWrt, otherwise tproxy
won't work for devices connected to br-lan (bypassed by the fw rules).

We have introduced a new compile-time flag for new version (which
is not released yet), but it's unnecessray to backport redudant
patches as here is still at the old version.

Fixes: #1042

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-06 10:44:49 +08:00

39 lines
1.5 KiB
Diff

From ca6a05273284daa04856a840e64f3936f700b7c3 Mon Sep 17 00:00:00 2001
From: mzz2017 <mzz@tuta.io>
Date: Fri, 16 Sep 2022 15:13:11 +0800
Subject: [PATCH] fix: we should skip interface ppp+ to avoid to break net
---
service/core/iptables/tproxy.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/core/iptables/tproxy.go
+++ b/core/iptables/tproxy.go
@@ -16,7 +16,7 @@ var Tproxy tproxy
func (t *tproxy) AddIPWhitelist(cidr string) {
// avoid duplication
t.RemoveIPWhitelist(cidr)
- pos := 5
+ pos := 7
if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
pos += 3
}
@@ -68,6 +68,8 @@ iptables -w 2 -t mangle -A TP_RULE -m ma
iptables -w 2 -t mangle -A TP_RULE -i br-+ -j RETURN
iptables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
iptables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
+iptables -w 2 -t mangle -A TP_RULE -i ppp+ -j RETURN
+iptables -w 2 -t mangle -A TP_RULE -i dn42-+ -j RETURN
`
if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
commands += `
@@ -127,6 +129,8 @@ ip6tables -w 2 -t mangle -A TP_RULE -m m
ip6tables -w 2 -t mangle -A TP_RULE -i br-+ -j RETURN
ip6tables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
ip6tables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
+ip6tables -w 2 -t mangle -A TP_RULE -i ppp+ -j RETURN
+ip6tables -w 2 -t mangle -A TP_RULE -i dn42-+ -j RETURN
`
if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
commands += `