linux joiner

This commit is contained in:
kulikov0 committed 2026-05-11 18:01:34 +02:00
1 parent 30ed29a161
commit 18358c8927
17 files changed
+185 -86

No files matched your search

+2
View File
@@ -151,6 +151,8 @@ rm -f "$HEADLESS_DIR"/headless-telemost-bundle "$HEADLESS_DIR"/headless-telemost
rm -f "$HEADLESS_DIR"/headless-wbstream-darwin "$HEADLESS_DIR"/headless-wbstream-windows-*.exe "$HEADLESS_DIR"/headless-wbstream-linux-*
rm -f "$HEADLESS_DIR"/headless-wbstream-bundle "$HEADLESS_DIR"/headless-wbstream-bundle.exe
"$ROOT/clean-prebuilts.sh"
echo ""
echo "=== Done ==="
ls -lh "$ROOT/prebuilts/"
+63
View File
@@ -0,0 +1,63 @@
#!/bin/sh
set -e
# Builds the desktop-joiner Go binary for Windows and Linux, plus
# fetches wintun.dll for Windows. Output lives next to the Go source
# in joiner-desktop-app/desktop-joiner/. Nothing is written to
# prebuilts/. Run ./build-joiner-app.sh afterwards to produce the
# Electron installers.
ROOT="$(cd "$(dirname "$0")" && pwd)"
JOINER_GO_DIR="$ROOT/joiner-desktop-app/desktop-joiner"
WINTUN_VERSION="0.14.1"
WINTUN_URL="https://www.wintun.net/builds/wintun-${WINTUN_VERSION}.zip"
build_windows() {
GOARCH_GO="$1"
OUT_TAG="$2"
WINTUN_ARCH="$3"
echo ""
echo "=== Building desktop-joiner windows-$OUT_TAG (GOARCH=$GOARCH_GO) ==="
cd "$JOINER_GO_DIR"
GOOS=windows GOARCH="$GOARCH_GO" go build \
-trimpath -ldflags="-s -w" \
-o "$JOINER_GO_DIR/desktop-joiner-windows-$OUT_TAG.exe" .
ls -lh "$JOINER_GO_DIR/desktop-joiner-windows-$OUT_TAG.exe"
if [ ! -f "$JOINER_GO_DIR/wintun-$OUT_TAG.dll" ]; then
if [ ! -f "$JOINER_GO_DIR/wintun.zip" ]; then
echo "[wintun] downloading $WINTUN_URL"
curl -L -o "$JOINER_GO_DIR/wintun.zip" "$WINTUN_URL"
fi
echo "[wintun] extracting $WINTUN_ARCH"
unzip -o -j "$JOINER_GO_DIR/wintun.zip" "wintun/bin/$WINTUN_ARCH/wintun.dll" \
-d "$JOINER_GO_DIR" >/dev/null
mv "$JOINER_GO_DIR/wintun.dll" "$JOINER_GO_DIR/wintun-$OUT_TAG.dll"
fi
ls -lh "$JOINER_GO_DIR/wintun-$OUT_TAG.dll"
}
build_linux() {
GOARCH_GO="$1"
OUT_TAG="$2"
echo ""
echo "=== Building desktop-joiner linux-$OUT_TAG (GOARCH=$GOARCH_GO) ==="
cd "$JOINER_GO_DIR"
GOOS=linux GOARCH="$GOARCH_GO" go build \
-trimpath -ldflags="-s -w" \
-o "$JOINER_GO_DIR/desktop-joiner-linux-$OUT_TAG" .
ls -lh "$JOINER_GO_DIR/desktop-joiner-linux-$OUT_TAG"
}
build_windows amd64 x64 amd64
build_windows arm64 arm64 arm64
build_windows 386 ia32 x86
build_linux amd64 x64
build_linux arm64 arm64
rm -f "$JOINER_GO_DIR/wintun.zip"
echo ""
echo "=== Done ==="
ls -lh "$JOINER_GO_DIR"/desktop-joiner-* "$JOINER_GO_DIR"/wintun-*.dll
+27 -11
View File
@@ -1,16 +1,17 @@
#!/bin/sh
set -e
# Builds the user-facing Electron joiner app for Windows, following the
# same per-arch bundle pattern as build-creator.sh. Output is the NSIS
# installer in prebuilts/ (via electron-builder's directories.output).
# Builds the user-facing Electron joiner app for Windows (portable .exe)
# and Linux (AppImage), following the same per-arch bundle pattern as
# build-creator.sh. Output ends up in prebuilts/ via electron-builder's
# directories.output.
ROOT="$(cd "$(dirname "$0")" && pwd)"
JOINER_GO_DIR="$ROOT/joiner-desktop-app/windows-joiner"
JOINER_GO_DIR="$ROOT/joiner-desktop-app/desktop-joiner"
ELECTRON_DIR="$ROOT/joiner-desktop-app"
echo "=== Building Go backend ==="
"$ROOT/build-windows-joiner.sh"
"$ROOT/build-desktop-joiner.sh"
cd "$ELECTRON_DIR"
if [ ! -d node_modules/typescript ]; then
@@ -19,22 +20,37 @@ if [ ! -d node_modules/typescript ]; then
fi
npx tsc
cleanup_bundle() {
rm -f "$JOINER_GO_DIR/windows-joiner-bundle.exe" \
"$JOINER_GO_DIR/wintun-bundle.dll"
cleanup_artifacts() {
rm -f "$JOINER_GO_DIR"/desktop-joiner-windows-*.exe \
"$JOINER_GO_DIR"/desktop-joiner-linux-* \
"$JOINER_GO_DIR"/desktop-joiner-bundle \
"$JOINER_GO_DIR"/desktop-joiner-bundle.exe \
"$JOINER_GO_DIR"/wintun-*.dll
}
trap cleanup_bundle EXIT
trap cleanup_artifacts EXIT
for pair in "x64 --x64" "ia32 --ia32" "arm64 --arm64"; do
arch="${pair% *}"
flag="${pair#* }"
echo ""
echo "--- Windows $arch ---"
cp "$JOINER_GO_DIR/windows-joiner-$arch.exe" "$JOINER_GO_DIR/windows-joiner-bundle.exe"
cp "$JOINER_GO_DIR/desktop-joiner-windows-$arch.exe" "$JOINER_GO_DIR/desktop-joiner-bundle.exe"
cp "$JOINER_GO_DIR/wintun-$arch.dll" "$JOINER_GO_DIR/wintun-bundle.dll"
npx electron-builder --win $flag --publish never
done
for pair in "x64 --x64" "arm64 --arm64"; do
arch="${pair% *}"
flag="${pair#* }"
echo ""
echo "--- Linux $arch ---"
cp "$JOINER_GO_DIR/desktop-joiner-linux-$arch" "$JOINER_GO_DIR/desktop-joiner-bundle"
chmod +x "$JOINER_GO_DIR/desktop-joiner-bundle"
npx electron-builder --linux $flag --publish never
done
"$ROOT/clean-prebuilts.sh"
echo ""
echo "=== Done ==="
ls -lh "$ROOT/prebuilts"/WhitelistBypass*.exe 2>/dev/null || true
ls -lh "$ROOT/prebuilts"/WhitelistBypass* 2>/dev/null || true
-47
View File
@@ -1,47 +0,0 @@
#!/bin/sh
set -e
# Builds the Windows joiner Go binary and fetches wintun.dll, next to
# the Go source in joiner-desktop-app/windows-joiner/. Nothing is
# written to prebuilts/. Run ./build-joiner-app.sh afterwards to
# produce the Electron installer.
ROOT="$(cd "$(dirname "$0")" && pwd)"
JOINER_GO_DIR="$ROOT/joiner-desktop-app/windows-joiner"
WINTUN_VERSION="0.14.1"
WINTUN_URL="https://www.wintun.net/builds/wintun-${WINTUN_VERSION}.zip"
build_arch() {
GOARCH_GO="$1"
OUT_TAG="$2"
WINTUN_ARCH="$3"
echo ""
echo "=== Building windows-joiner ($OUT_TAG / GOARCH=$GOARCH_GO) ==="
cd "$JOINER_GO_DIR"
GOOS=windows GOARCH="$GOARCH_GO" go build \
-trimpath -ldflags="-s -w" \
-o "$JOINER_GO_DIR/windows-joiner-$OUT_TAG.exe" .
ls -lh "$JOINER_GO_DIR/windows-joiner-$OUT_TAG.exe"
if [ ! -f "$JOINER_GO_DIR/wintun-$OUT_TAG.dll" ]; then
if [ ! -f "$JOINER_GO_DIR/wintun.zip" ]; then
echo "[wintun] downloading $WINTUN_URL"
curl -L -o "$JOINER_GO_DIR/wintun.zip" "$WINTUN_URL"
fi
echo "[wintun] extracting $WINTUN_ARCH"
unzip -o -j "$JOINER_GO_DIR/wintun.zip" "wintun/bin/$WINTUN_ARCH/wintun.dll" \
-d "$JOINER_GO_DIR" >/dev/null
mv "$JOINER_GO_DIR/wintun.dll" "$JOINER_GO_DIR/wintun-$OUT_TAG.dll"
fi
ls -lh "$JOINER_GO_DIR/wintun-$OUT_TAG.dll"
}
build_arch amd64 x64 amd64
build_arch arm64 arm64 arm64
build_arch 386 ia32 x86
rm -f "$JOINER_GO_DIR/wintun.zip"
echo ""
echo "=== Done ==="
ls -lh "$JOINER_GO_DIR"/windows-joiner-*.exe "$JOINER_GO_DIR"/wintun-*.dll
+40
View File
@@ -0,0 +1,40 @@
#!/bin/sh
set -e
# Removes electron-builder scratch files from prebuilts/ so only the
# final shippable artifacts remain (per-arch installers / AppImages and
# the standalone headless CLIs).
ROOT="$(cd "$(dirname "$0")" && pwd)"
PREBUILTS="$ROOT/prebuilts"
rm -rf "$PREBUILTS"/win-unpacked \
"$PREBUILTS"/win-ia32-unpacked \
"$PREBUILTS"/win-arm64-unpacked \
"$PREBUILTS"/linux-unpacked \
"$PREBUILTS"/linux-arm64-unpacked \
"$PREBUILTS"/mac \
"$PREBUILTS"/mac-arm64 \
"$PREBUILTS"/.icon-set
rm -f "$PREBUILTS"/*.blockmap \
"$PREBUILTS"/builder-debug.yml \
"$PREBUILTS"/builder-effective-config.yaml \
"$PREBUILTS"/latest*.yml
# electron-builder emits an arch-less duplicate alongside the per-arch
# files when multiple archs build in one invocation. Drop everything
# that isn't tagged with x64 / ia32 / arm64.
for f in "$PREBUILTS"/"WhitelistBypass "*-*.exe \
"$PREBUILTS"/"WhitelistBypass "*-*.AppImage \
"$PREBUILTS"/"WhitelistBypass "*-*.dmg \
"$PREBUILTS"/"WhitelistBypass "*-*.zip; do
[ -e "$f" ] || continue
case "$f" in
*-x64.exe|*-ia32.exe|*-arm64.exe) ;;
*-x64.AppImage|*-arm64.AppImage) ;;
*-x64.dmg|*-arm64.dmg|*-universal.dmg) ;;
*-x64.zip|*-arm64.zip|*-universal.zip) ;;
*) rm -f "$f" ;;
esac
done
@@ -0,0 +1,7 @@
desktop-joiner-windows-*.exe
desktop-joiner-linux-*
desktop-joiner-bundle
desktop-joiner-bundle.exe
wintun-*.dll
wintun-bundle.dll
wintun.zip
@@ -2,10 +2,10 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="whitelist.bypass.windows-joiner"
name="whitelist.bypass.desktop-joiner"
version="1.0.0.0"
processorArchitecture="*"/>
<description>Whitelist Bypass Windows Joiner</description>
<description>Whitelist Bypass Desktop Joiner</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
@@ -1,4 +1,4 @@
module windows-joiner
module desktop-joiner
go 1.26.1
@@ -1,12 +1,11 @@
// Command windows-joiner is the engine behind the Windows joiner GUI.
// It runs a headless WB Stream or Telemost joiner exactly like the
// Linux CLIs in headless/{wbstream,telemost}-joiner, but additionally
// brings up a wintun adapter so every IP packet on the host is steered
// through the resulting SOCKS5 proxy.
// Command desktop-joiner is the engine behind the desktop joiner GUI.
// On Windows it brings up a wintun adapter so every IP packet on the
// host is steered through the resulting SOCKS5 proxy. On Linux it
// only exposes the SOCKS5 proxy (TUN routing is left to the user).
//
// It must run with administrator rights (the embedded manifest asks
// for them); creating wintun adapters and editing the route table
// both require elevation.
// On Windows it must run with administrator rights (the embedded
// manifest asks for them); creating wintun adapters and editing the
// route table both require elevation.
package main
import (
+15 -3
View File
@@ -32,14 +32,26 @@
"requestedExecutionLevel": "requireAdministrator",
"extraResources": [
{
"from": "windows-joiner/windows-joiner-bundle.exe",
"to": "windows-joiner.exe"
"from": "desktop-joiner/desktop-joiner-bundle.exe",
"to": "desktop-joiner.exe"
},
{
"from": "windows-joiner/wintun-bundle.dll",
"from": "desktop-joiner/wintun-bundle.dll",
"to": "wintun.dll"
}
]
},
"linux": {
"target": "AppImage",
"artifactName": "${productName}-${version}-${arch}.${ext}",
"icon": "resources/icon.png",
"category": "Network",
"extraResources": [
{
"from": "desktop-joiner/desktop-joiner-bundle",
"to": "desktop-joiner"
}
]
}
}
}
+17 -7
View File
@@ -36,12 +36,19 @@ function closeCaptchaWindow() {
}
function resolveJoinerExe(): string {
// When packaged, electron-builder copies windows-joiner.exe into
// resources/. In dev, look next to the source binary.
const packaged = join(process.resourcesPath || '', 'windows-joiner.exe');
// When packaged, electron-builder copies the backend binary into
// resources/ under the OS-appropriate name. In dev, fall back to
// the per-arch artifact next to the Go source.
const exeName = process.platform === 'win32' ? 'desktop-joiner.exe' : 'desktop-joiner';
const packaged = join(process.resourcesPath || '', exeName);
if (existsSync(packaged)) return packaged;
const fallback = join(__dirname, '..', '..', '..', 'prebuilts', 'windows-joiner-x64.exe');
return fallback;
const archMap: Record<string, string> = { x64: 'x64', arm64: 'arm64', ia32: 'ia32' };
const archTag = archMap[process.arch] ?? 'x64';
const platTag = process.platform === 'win32' ? 'windows' : 'linux';
const suffix = process.platform === 'win32' ? '.exe' : '';
return join(__dirname, '..', '..', 'desktop-joiner',
`desktop-joiner-${platTag}-${archTag}${suffix}`);
}
function send(channel: string, payload: unknown) {
@@ -85,8 +92,11 @@ ipcMain.handle(IPC.START, async (_e, settings: JoinerSettings) => {
}
const exe = resolveJoinerExe();
if (!existsSync(exe)) {
return { ok: false, error: `windows-joiner.exe not found at ${exe}` };
return { ok: false, error: `desktop-joiner binary not found at ${exe}` };
}
// wintun is Windows-only; on Linux always run in SOCKS5-only mode
// regardless of the noTun checkbox.
const noTun = process.platform !== 'win32' ? true : settings.noTun;
const args = [
'--platform', settings.platform,
'--link', settings.link,
@@ -100,7 +110,7 @@ ipcMain.handle(IPC.START, async (_e, settings: JoinerSettings) => {
];
if (settings.socksUser) args.push('--socks-user', settings.socksUser);
if (settings.socksPass) args.push('--socks-pass', settings.socksPass);
if (settings.noTun) args.push('--no-tun');
if (noTun) args.push('--no-tun');
const commandLine = [exe, ...args].map((s) => (/\s/.test(s) ? `"${s}"` : s)).join(' ');
send(IPC.LOG, `[main] spawning: ${commandLine}\n`);
@@ -1,5 +0,0 @@
windows-joiner-*.exe
windows-joiner-bundle.exe
wintun-*.dll
wintun-bundle.dll
wintun.zip
+4 -2
View File
@@ -19,8 +19,8 @@ echo "=== Building Linux headless joiners ==="
"$ROOT/build-joiners.sh"
echo ""
echo "=== Building Windows joiner (Go binary + wintun.dll) ==="
"$ROOT/build-windows-joiner.sh"
echo "=== Building desktop joiner (Windows + Linux Go binaries + wintun.dll) ==="
"$ROOT/build-desktop-joiner.sh"
echo ""
echo "=== Building Linux headless-vk-bot ==="
@@ -35,6 +35,8 @@ else
echo "=== Skipping iOS build (requires macOS) ==="
fi
"$ROOT/clean-prebuilts.sh"
echo ""
echo "=== Release complete ==="
ls -lh "$PREBUILTS/"