+++ /dev/null
-From e7839b5e9de01f8dca66449eb2e720963a56f403 Mon Sep 17 00:00:00 2001
-From: mzz2017 <mzz@tuta.io>
-Date: Sat, 5 Feb 2022 20:23:32 +0800
-Subject: [PATCH] fix: failed to clean iptables rules in some cases
-
----
- service/core/v2ray/transparent.go | 13 ++++++-------
- 1 file changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/core/v2ray/transparent.go b/core/v2ray/transparent.go
-index 5480660..07b01a0 100644
---- a/core/v2ray/transparent.go
-+++ b/core/v2ray/transparent.go
-@@ -12,12 +12,14 @@ import (
- )
-
- func DeleteTransparentProxyRules() {
-- removeResolvHijacker()
- iptables.CloseWatcher()
-- iptables.Tproxy.GetCleanCommands().Run(false)
-- iptables.Redirect.GetCleanCommands().Run(false)
-+ if !conf.GetEnvironmentConfig().Lite {
-+ removeResolvHijacker()
-+ iptables.Tproxy.GetCleanCommands().Run(false)
-+ iptables.Redirect.GetCleanCommands().Run(false)
-+ iptables.DropSpoofing.GetCleanCommands().Run(false)
-+ }
- iptables.SystemProxy.GetCleanCommands().Run(false)
-- iptables.DropSpoofing.GetCleanCommands().Run(false)
- time.Sleep(100 * time.Millisecond)
- }
-
-@@ -89,9 +91,6 @@ func CheckAndSetupTransparentProxy(checkRunning bool, setting *configure.Setting
- }
-
- func CheckAndStopTransparentProxy() {
-- if !IsTransparentOn() {
-- return
-- }
- DeleteTransparentProxyRules()
- }
-
---
-2.20.1
-