feat: per-app awg and custom via

This commit is contained in:
FUFSoB committed 2026-10-04 15:39:56 +05:00
1 parent af5b3ff27a
commit 65082aad88
43 files changed
+2674 -197

No files matched your search

+7
View File
@@ -10,6 +10,7 @@
scriptName ? "proxy-suite-zapret",
}:
let
derived = import ../derived.nix { inherit lib cfg; };
dropMarkTable = "${nft} delete table inet proxy_suite_per_app_zapret_mark 2>/dev/null || true";
in
{
@@ -21,6 +22,12 @@ in
tunInterfaces = lib.unique (
lib.optional (cfg.proxy.enable && cfg.proxy.tun.enable) cfg.proxy.tun.interface
++ lib.optional (cfg.proxy.enable && cfg.perAppRouting.tun.enable) cfg.perAppRouting.tun.interface
# AmneziaWG outbound interfaces, and those apps run through: what enters them is a
# tunnel's inside. Desync there would send its fakes out the uplink, past the tunnel.
# (A trailing * is nft's wildcard; the iptables rules make it +.)
++ map (ob: ob.interface) derived.awgInterfaceOutbounds
++ lib.optional derived.awgRuntimeIfaceOutbounds "${derived.constants.awgRuntimeIfacePrefix}*"
++ lib.optional derived.perAppViaProfiles "${derived.constants.awgAppIfacePrefix}*"
# TProxy reroutes local apps' packets out lo to the backend's listener; desync there
# corrupts the handshake the backend reads, like on a TUN.
++ lib.optional (