Files
proxy-suite-flake/windows/tools/build-wireproxy-awg.sh
T
faumarayandClaude Opus 5.5 ae58bd1f12 windows: a setup program, and an uninstall entry in Settings > Apps
ProxySuite-<version>-windows-x64-setup.exe (NSIS, English and Russian):
it unpacks the release into its temporary folder and runs the release's
own proxy-suite-service.exe install from there, as install.cmd does from
the zip (unpacked straight into Program Files, an upgrade would find its
files in use). It refuses 32-bit Windows and anything before 10 1903, and
offers Windows' OpenSSH Client, unchecked, for the SSH tunnel.

install now writes the entry in Settings > Apps (uninstall.cmd; quietly,
the service's uninstall), and uninstall removes it, with WinDivert's
driver service when it is the suite's own.

The release workflow publishes the setup beside the zip. The app's
icon and GPUI's manifest share one resource (llvm-rc for both); the
build scripts' clones retry, and are kept for the next build.
Tested under Wine: tools/wine-setup-test.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:45:09 +03:00

36 lines
1.6 KiB
Bash
Executable File

#!/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
. "$(dirname "$0")/lib.sh"
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
clone_tag https://github.com/artem-russkikh/wireproxy-awg "v$VERSION" "$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"