windows: AmneziaWG outbounds, and WARP through wireproxy
- 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>
This commit is contained in:
1 parent
62adadc207
commit
2c4cdee7d3
15 files changed
+980
-10
No files matched your search
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
# wireproxy-awg: the AmneziaWG client as a SOCKS listener, behind AmneziaWG and WARP outbounds
|
||||
# of the "userspace" kind; no driver, no interface. Built from upstream's tag as upstream's
|
||||
# pkgs/wireproxy-awg.nix builds it: its patch, and its vendored amneziawg-go with the suite's.
|
||||
# Modules are checked against the project's go.sum; the source by its commit.
|
||||
#
|
||||
# tools/build-wireproxy-awg.sh OUT_DIR [GOOS] (needs git, go, patch; GOOS: windows)
|
||||
set -euo pipefail
|
||||
OUT=$(realpath -m "${1:?output directory}")
|
||||
GOOS=${2:-windows}
|
||||
cd "$(dirname "$0")"
|
||||
VERSION=1.0.18
|
||||
COMMIT=84f4795ea76f9c3168a61e478d0fe0e5c3238308
|
||||
PATCHES=$(realpath ../../pkgs/patches)
|
||||
WORK=$(mktemp -d)
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
|
||||
git -c advice.detachedHead=false clone -q --depth 1 --branch "v$VERSION" https://github.com/artem-russkikh/wireproxy-awg "$WORK/src"
|
||||
[ "$(git -C "$WORK/src" rev-parse HEAD)" = "$COMMIT" ] || { echo "tag v$VERSION moved off $COMMIT"; exit 1; }
|
||||
cd "$WORK/src"
|
||||
patch -s -p1 <"$PATCHES/wireproxy-awg-fwmark.patch"
|
||||
# The Go of the shell, never one Go would fetch for itself.
|
||||
export GOTOOLCHAIN=local GOFLAGS=-mod=mod
|
||||
go mod vendor
|
||||
chmod -R u+w vendor/github.com/amnezia-vpn/amneziawg-go/v3
|
||||
patch -s -p1 -d vendor/github.com/amnezia-vpn/amneziawg-go/v3 <"$PATCHES/amneziawg-go-random-trailers-transport.patch"
|
||||
|
||||
rm -rf "$OUT" && mkdir -p "$OUT"
|
||||
exe=wireproxy
|
||||
[ "$GOOS" = windows ] && exe=wireproxy.exe
|
||||
CGO_ENABLED=0 GOOS=$GOOS GOARCH=amd64 GOFLAGS=-mod=vendor go build -trimpath -ldflags "-s -w -X main.version=$VERSION" -o "$OUT/$exe" ./cmd/wireproxy
|
||||
cp LICENSE "$OUT/"
|
||||
echo "$VERSION" >"$OUT/.version"
|
||||
echo "wireproxy-awg $VERSION ($GOOS) in $OUT"
|
||||
@@ -3,8 +3,8 @@
|
||||
# proxy-ctl, the app), every component (fetched and verified), the install scripts, the README
|
||||
# and the licenses.
|
||||
#
|
||||
# nix develop --command tools/package.sh (needs curl, git, unzip, zip, pip; nix for
|
||||
# the app's shader compiler, tools/fxc-wine.sh)
|
||||
# nix develop --command tools/package.sh (needs curl, git, unzip, zip, pip, go; nix
|
||||
# for the app's shader compiler, tools/fxc-wine.sh)
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)
|
||||
@@ -16,6 +16,7 @@ mkdir -p "$DIST/components"
|
||||
|
||||
echo "== components"
|
||||
tools/build-tg-ws-proxy.sh "$DIST/components/tg-ws-proxy"
|
||||
tools/build-wireproxy-awg.sh "$DIST/components/wireproxy-awg" windows
|
||||
cargo build -q --release -p ps-service
|
||||
target/release/proxy-suite-service stage-components --to "$DIST/components" --cache "$CACHE"
|
||||
rm -rf "$DIST"/components/*.old "$DIST"/components/*.staging
|
||||
@@ -50,6 +51,7 @@ echo "== THIRD-PARTY.md"
|
||||
echo "- **cygwin1.dll** (zapret, zapret2): LGPL-3.0, https://cygwin.com"
|
||||
echo "- **zapret2** (winws2.exe, its Lua) and **nfqws2-keenetic** (its strategies, lists, blobs): MIT, https://github.com/bol-van/zapret2, https://github.com/nfqws/nfqws2-keenetic"
|
||||
echo "- **wintun** (inside sing-box): WireGuard's prebuilt-binary license, https://www.wintun.net"
|
||||
echo "- **amneziawg-go** (inside wireproxy-awg, with the suite's patch): MIT, https://github.com/amnezia-vpn/amneziawg-go"
|
||||
echo "- **lyrebird** and **conjure** (Tor's pluggable transports, in the Expert Bundle): their licenses are in components/tor/docs"
|
||||
echo "- **CPython $( sed 's/.*+py//' "$DIST/components/tg-ws-proxy/.version" )** (tg-ws-proxy): PSF License, https://www.python.org"
|
||||
echo "- **The programs themselves** (proxy-suite-service, proxy-ctl, proxy-suite) are built from"
|
||||
|
||||
Reference in new issue
Block a user