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

+41 -1
View File
@@ -63,13 +63,52 @@ services.proxy-suite = {
Then run `proxy-ctl apps run browser -- chromium`.
## Through one outbound
Send an app through one outbound you pick, past the [routing rules](./routing.md):
```sh
proxy-ctl apps run --via nl -- firefox
proxy-ctl apps run --via nl --route tproxy -- curl https://example.com
```
Or name it in a profile:
```nix
services.proxy-suite = {
enable = true;
proxy = {
enable = true;
outbounds = [ { tag = "nl"; urlFile = "/run/secrets/nl-url"; } ];
};
perAppRouting = {
enable = true;
tun.enable = true;
profiles = [ { name = "game"; route = "tun"; outbound = "nl"; } ];
};
};
```
- An "interface" AmneziaWG outbound, or a global AmneziaWG profile (`--via home`), takes the
app straight into its interface, with no proxy in between, and sends the app's DNS to the
profile's DNS server. See [Use an AmneziaWG config](./amneziawg.md).
- Any other outbound goes through per-app TUN or TProxy (`--route`; TUN when both are
enabled) and needs the sing-box or hybrid backend. Each outbound in use takes one of
`perAppRouting.via.pinSlots`.
- When the outbound is down, the app's connections fail; they never leave another way.
- Add profiles without a rebuild: `proxy-ctl apps add game --via nl`, then
`proxy-ctl apps rm game`. In `proxy-tui` and the desktop app, the Apps tab adds and removes
them, and runs a command via an outbound.
## Good to know
- `tun`, `tproxy` and `zapret` profiles start a system service, so they ask for an admin
password unless `userControl` grants the `perApp` scope (see
[Control it day to day](./control.md)).
- While a global TUN or TProxy is running, these three run the app without their route:
the global mode already carries its traffic. `proxy-ctl` prints a note when it does.
the global mode already carries its traffic. `proxy-ctl` prints a note when it does. So
does `--via`, except that an "interface" AmneziaWG outbound still takes the app under a
global TProxy or AmneziaWG profile.
- If `/etc/resolv.conf` points only at a local resolver (such as systemd-resolved on
127.0.0.53), the app's DNS queries skip its route. `proxy-ctl` warns about this.
- The app follows your [routing rules](./routing.md) like any other proxied traffic.
@@ -79,3 +118,4 @@ Then run `proxy-ctl apps run browser -- chromium`.
- [Wrap programs with the proxy](./wrap-apps.md): a package that always starts through a profile
- [`perAppRouting.profiles`](../options/perAppRouting.md#services-proxy-suite-perapprouting-profiles)
- [`perAppRouting.createDefaultProfiles`](../options/perAppRouting.md#services-proxy-suite-perapprouting-createdefaultprofiles)
- [`perAppRouting.via`](../options/perAppRouting.md#services-proxy-suite-perapprouting-via-pinslots)