Each profile without asOutbound is a tunnel service of its own,
AmneziaWGTunnel$<interface>, as amneziawg-windows's client installs one:
amneziawg-go on Wintun, its routes and DNS, and for one peer that takes
everything its firewall blocking what would leave outside the tunnel.
It runs awg-tunnel.exe, amneziawg-windows built from its pinned commit
with a main of ours (its Run(), its log in a file) instead of its
tunnel.dll, beside Wintun's signed DLL (tools/build-amneziawg.sh).
The service writes each profile's .conf below its state root, registers
the tunnel (unrestricted service SID, which its firewall exempts it by),
starts the autostart ones with itself, and removes the tunnels of
profiles gone, and all of them on uninstall. proxy-ctl awg
list|on|off|log, and the app's AmneziaWG page: profiles (a system-wide
one switched on and off, its log), one added from a vpn:// link or a
.conf, or removed.
tools/lib.sh: clone_commit, and fetch_pinned, which fetches in pieces a
download that stalls (some networks cut TLS after about 16 KB, as
wintun.net's here).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Creators and joiners, built from upstream's tag with upstream's patches
(links and passwords from the environment, never argv), run by the
service as whitelist-bypass.nix runs them: joiners while the proxy runs,
as its outbounds, creators while the suite is on, their logins kept in
a working copy they refresh. proxy-ctl wl list|link|auth|join|new|restart
over new API requests (whitelistBypass scope).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ps_core::awg: upstream's scripts/amneziawg_config.py, ported: a profile
from a .conf, an AmneziaVPN vpn:// link (qCompress'd JSON or the compact
.conf form, containers and DNS placeholders as upstream reads them) or
declarative settings (with obfuscationFile's secrets); AWG 3's MTU
default, the endpoint override, upstream's checks (no wg-quick hooks
unless allowed, no control characters, one [Interface]); and the
wireproxy configuration. Checked against links made by upstream's own
encoder, output byte for byte.
- wireproxy-awg for Windows, built from upstream's tag (pinned to its
commit) with upstream's patches, by tools/build-wireproxy-awg.sh; in
the release as a bundled component. Go joins the dev shell.
- The service runs one per "userspace" AmneziaWG outbound and WARP
device, on its loopback port with the hop login, its configuration
below the protected state root; "singBox" profiles reach the renderer.
wireproxy goes direct under the TUN.
- End to end on Linux (an_amneziawg_tunnel): sing-box as the WireGuard
server, the service's wireproxy as the client; a page through its
listener and through the proxy's outbound, named inside the tunnel.
- What is still to come and said: AmneziaWG as a system-wide VPN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tor: the Tor Project's Expert Bundle for Windows (15.0.26) as a
component, pinned by the hash of the release whose signature was
checked against the Tor Browser Developers' key; the installer takes
gzipped tars now (plain files only: a link could point anywhere).
- The torrc upstream's tor.nix writes: SOCKS for the tor outbound,
bridges with the bundle's lyrebird (obfs4, webtunnel, meek, snowflake)
and conjure, the local proxy as upstream (upstream = "proxy") with its
login, extraConfig. The control port is on loopback with cookie
authentication (upstream's is a Unix socket only Tor's user opens).
Values are quoted with control characters escaped: a newline in, say,
the proxy's login would otherwise start a directive (one that runs a
program, as SYSTEM).
- Tor's own connections go direct under the TUN unless upstream =
"proxy". The onion service (for the inbounds) is still to come and is
said to be.
- Checked: Windows' tor.exe, under Wine, takes a torrc of this shape,
bridges and escaped values included; on Linux the service runs Tor and
it bootstraps as far as this network lets it without bridges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A root not owned by SYSTEM or Administrators is moved aside; the root
gets SYSTEM as owner and an OWNER RIGHTS entry, so owning a file below
it grants nothing. Adds the pinned component manifest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>