fix: hardening and fixes

This commit is contained in:
fufsob committed 2026-09-15 08:56:33 +00:00
1 parent aa19042ee5
commit a82417a2bd
32 files changed
+619 -256

No files matched your search

+5
View File
@@ -30,6 +30,7 @@ let
tgWithGlobalTunServiceConfig
tgWithGlobalTunBypassUp
tgWithGlobalTunBypassDown
tgWithGlobalTunModule
tgWithGlobalTunRules
tgWithGlobalTproxyNft
invalidTgWsProxyAssertions
@@ -81,6 +82,10 @@ in
# Global TUN/TProxy bypass mark keeps relay traffic out of transparent capture.
(
assert !(tgWithGlobalTunServiceConfig ? SocketMark);
# The relay runs as the service user; only the bypass scripts are privileged.
assert tgWithGlobalTunServiceConfig.User == "proxy-suite-daemon";
assert tgWithGlobalTunServiceConfig.ExecStartPre == "+${tgWithGlobalTunModule.bypassUpScript}";
assert tgWithGlobalTunServiceConfig.ExecStopPost == "+${tgWithGlobalTunModule.bypassDownScript}";
assert pkgs.lib.hasInfix "\"system.slice/proxy-suite-tg-ws-proxy.service\" meta mark set 4" tgWithGlobalTunBypassUp;
assert pkgs.lib.hasInfix "delete table inet proxy_suite_tg_ws_proxy" tgWithGlobalTunBypassDown;
assert pkgs.lib.hasInfix "rule add pref 8999 fwmark 4 lookup main" tgWithGlobalTunBypassUp;