012-improved.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 4a87a6fc9a17939cc0fc54058b2128b1f688045a Mon Sep 17 00:00:00 2001
  2. From: Xiaoxu Guo <[email protected]>
  3. Date: Thu, 4 Aug 2022 22:56:46 +0800
  4. Subject: [PATCH] improved
  5. ---
  6. service/core/iptables/tproxy.go | 6 +++---
  7. 1 file changed, 3 insertions(+), 3 deletions(-)
  8. --- a/core/iptables/tproxy.go
  9. +++ b/core/iptables/tproxy.go
  10. @@ -16,7 +16,7 @@ var Tproxy tproxy
  11. func (t *tproxy) AddIPWhitelist(cidr string) {
  12. // avoid duplication
  13. t.RemoveIPWhitelist(cidr)
  14. - pos := 5
  15. + pos := 6
  16. if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
  17. pos += 3
  18. }
  19. @@ -65,7 +65,7 @@ iptables -w 2 -t mangle -A TP_PRE -p udp
  20. iptables -w 2 -t mangle -A TP_RULE -j CONNMARK --restore-mark
  21. iptables -w 2 -t mangle -A TP_RULE -m mark --mark 0x40/0xc0 -j RETURN
  22. -iptables -w 2 -t mangle -A TP_RULE -i br+ -j RETURN
  23. +iptables -w 2 -t mangle -A TP_RULE -i br-+ -j RETURN
  24. iptables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
  25. iptables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
  26. `
  27. @@ -124,7 +124,7 @@ ip6tables -w 2 -t mangle -A TP_PRE -p ud
  28. ip6tables -w 2 -t mangle -A TP_RULE -j CONNMARK --restore-mark
  29. ip6tables -w 2 -t mangle -A TP_RULE -m mark --mark 0x40/0xc0 -j RETURN
  30. -ip6tables -w 2 -t mangle -A TP_RULE -i br+ -j RETURN
  31. +ip6tables -w 2 -t mangle -A TP_RULE -i br-+ -j RETURN
  32. ip6tables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
  33. ip6tables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
  34. `