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

@@ -83,6 +83,19 @@ in
default = "awg-rt";
description = "Interface of the global profiles added at runtime. Only one of them runs at a time, so they share it.";
};
outboundKind = mkOption {
type = types.enum [
"userspace"
"interface"
];
default = "userspace";
description = ''
How an outbound added with `proxy-ctl proxy outbounds add` runs, unless it says
(`--interface`, `--userspace`): in wireproxy, or as an AmneziaWG interface of its own
(root hosts only), which apps can also be run through with `proxy-ctl apps run --via`.
'';
};
};
profiles = mkOption {
@@ -85,6 +85,20 @@ in
localSubnets = localSubnets "Subnets that skip the proxy (DNS still goes through it).";
};
via = {
pinSlots = int 8 ''
How many outbounds `apps run --via` can send apps through at once, for per-app TProxy
and again for per-app TUN; at most 16. Apps via the same outbound share one. An
"interface" AmneziaWG outbound takes none: apps enter it directly.
'';
localSubnets = localSubnets ''
Subnets an app run `--via` an AmneziaWG interface (an "interface" outbound or a global
profile) still reaches directly; DNS still goes through the tunnel. Every other
address goes through it, private ones included, as the server may serve them.
'';
};
zapret = {
enable = mkEnableOption "per-app zapret, a separate zapret for wrapped apps only";
filterMark = int 268435456 "Firewall mark bit for wrapped apps' traffic.";
+14
View File
@@ -80,6 +80,20 @@ let
"tproxy" or "zapret".
'';
};
outbound = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Send all of the app's traffic through this outbound, past the routing rules. An
"interface" AmneziaWG outbound (`amneziaWg.profiles.<name>.asOutbound`), or a
global AmneziaWG profile, takes the app's packets into its interface directly,
whatever `route` is; any other outbound needs `route` "tun" or "tproxy". For a name
that is both a global profile and an outbound, say which: "awg:<name>" or
"outbound:<name>".
'';
example = "de";
};
};
};
in