fix: attempt to mitigate client<-server dropped packages

This commit is contained in:
FUFSoB committed 2026-06-18 20:15:05 +05:00
1 parent ce86e5669b
commit 5b5598d12e
14 files changed
+1271 -452

No files matched your search

+19 -3
View File
@@ -58,6 +58,8 @@ let
proxyCfg
proxyEnabled
xrayEnabled
hybridEnabled
pureXrayEnabled
activeBackend
perAppRoutingCfg
globalTun
@@ -236,7 +238,14 @@ let
enable = proxyEnabled;
name = serviceNames.socks;
value = mkRestartingService {
description = "${if xrayEnabled then "XRay" else "sing-box"} proxy client (SOCKS + TProxy-ready)";
description = "${
if pureXrayEnabled then
"XRay"
else if hybridEnabled then
"sing-box + XRay sidecar"
else
"sing-box"
} proxy client (SOCKS + TProxy-ready)";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
@@ -268,14 +277,21 @@ let
enable = proxyEnabled && globalTun.enable;
name = serviceNames.tun;
value = mkRestartingService {
description = "${if xrayEnabled then "XRay" else "sing-box"} TUN proxy client";
description = "${
if pureXrayEnabled then
"XRay"
else if hybridEnabled then
"sing-box + XRay sidecar"
else
"sing-box"
} TUN proxy client";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = lib.optionals globalTun.autostart [ "multi-user.target" ];
conflicts = [ "${serviceNames.tproxy}.service" ];
execStartPre = tunCleanupScript;
execStart = scripts.startTun;
execStartPost = if xrayEnabled then xrayTunUpScript else null;
execStartPost = if pureXrayEnabled then xrayTunUpScript else null;
execStopPost = tunCleanupScript;
runtimeDirectory = serviceNames.tun;
stateDirectory = "proxy-suite";