mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-15 04:53:00 +08:00
🍓 Sync 2026-11-12 02:30:31
This commit is contained in:
1 parent
2bb7c60602
commit
3af4c76cd6
25 files changed
+59
-2628
No files matched your search
+1
-1
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2raya
|
||||
PKG_VERSION:=2.5.14
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE:=v2rayA-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
|
||||
|
||||
@@ -104,6 +104,17 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
# v2rayA normally removes its tproxy rules on SIGTERM, but a killed
|
||||
# process or a proxy-only stop can leave them behind. Remove any
|
||||
# residual state so stopping the service always restores connectivity.
|
||||
nft delete table inet v2raya 2>/dev/null
|
||||
ip rule del fwmark 0x40/0xc0 table 100 2>/dev/null
|
||||
ip -6 rule del fwmark 0x40/0xc0 table 100 2>/dev/null
|
||||
ip route flush table 100 2>/dev/null
|
||||
ip -6 route flush table 100 2>/dev/null
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
# v2rayA does not reload its configuration on SIGHUP; a restart is the
|
||||
# only safe way to apply new UCI values.
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 14c682ddbca62226c4ca453fcac2d28fae6109c8 Mon Sep 17 00:00:00 2001
|
||||
From: Amr Fateem <amr.fateem@yahoo.com>
|
||||
Date: Wed, 11 Nov 2026 19:56:35 +0200
|
||||
Subject: [PATCH] openwrt: clean residual transparent-proxy rules on stop
|
||||
|
||||
When a core process stops, the in-memory transparentOn flag may be
|
||||
false even though tproxy rules from an earlier process are still
|
||||
installed. The early return then leaves those rules and the policy
|
||||
route behind, so all traffic is blackholed once the core is gone.
|
||||
|
||||
Delete the residual rules before returning. The normal path still runs
|
||||
the transparent-proxy hooks and removes the rules as before.
|
||||
|
||||
Signed-off-by: Amr Fateem <amr.fateem@yahoo.com>
|
||||
---
|
||||
kernel/v2ray/processManager.go | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/kernel/v2ray/processManager.go
|
||||
+++ b/kernel/v2ray/processManager.go
|
||||
@@ -170,9 +170,13 @@ func (m *CoreProcessManager) CheckAndSto
|
||||
|
||||
func (m *CoreProcessManager) checkAndStopTransparentProxy(setting *configure.Setting) {
|
||||
if !m.transparentOn.Swap(false) {
|
||||
- // Nothing installed by this process, so nothing to remove and no hook
|
||||
- // to run. Rules left behind by an earlier process are removed by
|
||||
- // cleanupResidualTransparentProxyRules when the rules are set up.
|
||||
+ // Clean residual rules from an earlier process too: after a
|
||||
+ // restart the in-memory flag is false while the tproxy rules
|
||||
+ // may still be installed, which blackholes all traffic when
|
||||
+ // the core stops.
|
||||
+ if setting != nil && setting.Transparent != configure.TransparentClose {
|
||||
+ deleteTransparentProxyRules()
|
||||
+ }
|
||||
return
|
||||
}
|
||||
if setting == nil {
|
||||
Reference in new issue
Block a user