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>
49 lines
2.2 KiB
Bash
Executable File
49 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# whitelist-bypass's headless ends for Windows (creators and joiners: a tunnel through the media
|
|
# servers of video calls), built from upstream's tag as upstream's pkgs/whitelist-bypass.nix
|
|
# builds them: the call link, the local proxy's password and a joiner's SOCKS password read
|
|
# from the environment by default, never the command line (any local user reads that).
|
|
#
|
|
# tools/build-whitelist-bypass.sh OUT_DIR [GOOS] (needs git, go, sed; GOOS: windows)
|
|
set -euo pipefail
|
|
. "$(dirname "$0")/lib.sh"
|
|
OUT=$(realpath -m "${1:?output directory}")
|
|
GOOS=${2:-windows}
|
|
VERSION=0.4.4
|
|
COMMIT=7c19a7ec40900940fe0c43ea1db7768ee632393d
|
|
WORK=$(mktemp -d)
|
|
trap 'rm -rf "$WORK"' EXIT
|
|
|
|
clone_tag https://github.com/kulikov0/whitelist-bypass "v$VERSION" "$WORK/src"
|
|
[ "$(git -C "$WORK/src" rev-parse HEAD)" = "$COMMIT" ] || { echo "tag v$VERSION moved off $COMMIT"; exit 1; }
|
|
cd "$WORK/src"
|
|
|
|
# upstream's postPatch: flag.String("NAME", "", …) defaults to os.Getenv("VAR").
|
|
env_default() {
|
|
local file="headless/$1/main.go"
|
|
grep -q "flag.String(\"$2\", \"\"," "$file" || { echo "$file has no flag $2 to patch"; exit 1; }
|
|
sed -i "s|flag.String(\"$2\", \"\",|flag.String(\"$2\", os.Getenv(\"$3\"),|" "$file"
|
|
}
|
|
for p in vk telemost wbstream dion bitrix; do env_default "$p" upstream-pass WB_UPSTREAM_PASS; done
|
|
for p in bitrix dion dion-joiner wbstream wbstream-joiner; do env_default "$p" room WB_LINK; done
|
|
for p in telemost-joiner wbstream-joiner dion-joiner bitrix-joiner; do env_default "$p" socks-pass WB_SOCKS_PASS; done
|
|
env_default bitrix-joiner link WB_LINK
|
|
env_default telemost tm-link WB_LINK
|
|
env_default telemost-joiner tm-link WB_LINK
|
|
env_default vk vk-link WB_LINK
|
|
|
|
export GOTOOLCHAIN=local CGO_ENABLED=0 GOOS GOARCH=amd64
|
|
ext=
|
|
[ "$GOOS" = windows ] && ext=.exe
|
|
rm -rf "$OUT" && mkdir -p "$OUT"
|
|
# Upstream's names (build-headless.sh): headless-<platform>-creator and -joiner.
|
|
for p in vk telemost wbstream dion bitrix; do
|
|
go build -trimpath -ldflags "-s -w" -o "$OUT/headless-$p-creator$ext" "./headless/$p"
|
|
done
|
|
for p in telemost wbstream dion bitrix; do
|
|
go build -trimpath -ldflags "-s -w" -o "$OUT/headless-$p-joiner$ext" "./headless/$p-joiner"
|
|
done
|
|
cp LICENSE "$OUT/"
|
|
echo "$VERSION" >"$OUT/.version"
|
|
echo "whitelist-bypass $VERSION ($GOOS) in $OUT"
|