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-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 rm -f "$HEADLESS_DIR"/headless-wbstream-bundle "$HEADLESS_DIR"/headless-wbstream-bundle.exe
"$ROOT/clean-prebuilts.sh"
echo "" echo ""
echo "=== Done ===" echo "=== Done ==="
ls -lh "$ROOT/prebuilts/" 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 #!/bin/sh
set -e set -e
# Builds the user-facing Electron joiner app for Windows, following the # Builds the user-facing Electron joiner app for Windows (portable .exe)
# same per-arch bundle pattern as build-creator.sh. Output is the NSIS # and Linux (AppImage), following the same per-arch bundle pattern as
# installer in prebuilts/ (via electron-builder's directories.output). # build-creator.sh. Output ends up in prebuilts/ via electron-builder's
# directories.output.
ROOT="$(cd "$(dirname "$0")" && pwd)" 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" ELECTRON_DIR="$ROOT/joiner-desktop-app"
echo "=== Building Go backend ===" echo "=== Building Go backend ==="
"$ROOT/build-windows-joiner.sh" "$ROOT/build-desktop-joiner.sh"
cd "$ELECTRON_DIR" cd "$ELECTRON_DIR"
if [ ! -d node_modules/typescript ]; then if [ ! -d node_modules/typescript ]; then
@@ -19,22 +20,37 @@ if [ ! -d node_modules/typescript ]; then
fi fi
npx tsc npx tsc
cleanup_bundle() { cleanup_artifacts() {
rm -f "$JOINER_GO_DIR/windows-joiner-bundle.exe" \ rm -f "$JOINER_GO_DIR"/desktop-joiner-windows-*.exe \
"$JOINER_GO_DIR/wintun-bundle.dll" "$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 for pair in "x64 --x64" "ia32 --ia32" "arm64 --arm64"; do
arch="${pair% *}" arch="${pair% *}"
flag="${pair#* }" flag="${pair#* }"
echo "" echo ""
echo "--- Windows $arch ---" 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" cp "$JOINER_GO_DIR/wintun-$arch.dll" "$JOINER_GO_DIR/wintun-bundle.dll"
npx electron-builder --win $flag --publish never npx electron-builder --win $flag --publish never
done 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 ""
echo "=== Done ===" 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"> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity <assemblyIdentity
type="win32" type="win32"
name="whitelist.bypass.windows-joiner" name="whitelist.bypass.desktop-joiner"
version="1.0.0.0" version="1.0.0.0"
processorArchitecture="*"/> processorArchitecture="*"/>
<description>Whitelist Bypass Windows Joiner</description> <description>Whitelist Bypass Desktop Joiner</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security> <security>
<requestedPrivileges> <requestedPrivileges>
@@ -1,4 +1,4 @@
module windows-joiner module desktop-joiner
go 1.26.1 go 1.26.1
@@ -1,12 +1,11 @@
// Command windows-joiner is the engine behind the Windows joiner GUI. // Command desktop-joiner is the engine behind the desktop joiner GUI.
// It runs a headless WB Stream or Telemost joiner exactly like the // On Windows it brings up a wintun adapter so every IP packet on the
// Linux CLIs in headless/{wbstream,telemost}-joiner, but additionally // host is steered through the resulting SOCKS5 proxy. On Linux it
// brings up a wintun adapter so every IP packet on the host is steered // only exposes the SOCKS5 proxy (TUN routing is left to the user).
// through the resulting SOCKS5 proxy.
// //
// It must run with administrator rights (the embedded manifest asks // On Windows it must run with administrator rights (the embedded
// for them); creating wintun adapters and editing the route table // manifest asks for them); creating wintun adapters and editing the
// both require elevation. // route table both require elevation.
package main package main
import ( import (
+15 -3
View File
@@ -32,14 +32,26 @@
"requestedExecutionLevel": "requireAdministrator", "requestedExecutionLevel": "requireAdministrator",
"extraResources": [ "extraResources": [
{ {
"from": "windows-joiner/windows-joiner-bundle.exe", "from": "desktop-joiner/desktop-joiner-bundle.exe",
"to": "windows-joiner.exe" "to": "desktop-joiner.exe"
}, },
{ {
"from": "windows-joiner/wintun-bundle.dll", "from": "desktop-joiner/wintun-bundle.dll",
"to": "wintun.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 { function resolveJoinerExe(): string {
// When packaged, electron-builder copies windows-joiner.exe into // When packaged, electron-builder copies the backend binary into
// resources/. In dev, look next to the source binary. // resources/ under the OS-appropriate name. In dev, fall back to
const packaged = join(process.resourcesPath || '', 'windows-joiner.exe'); // 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; 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) { function send(channel: string, payload: unknown) {
@@ -85,8 +92,11 @@ ipcMain.handle(IPC.START, async (_e, settings: JoinerSettings) => {
} }
const exe = resolveJoinerExe(); const exe = resolveJoinerExe();
if (!existsSync(exe)) { 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 = [ const args = [
'--platform', settings.platform, '--platform', settings.platform,
'--link', settings.link, '--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.socksUser) args.push('--socks-user', settings.socksUser);
if (settings.socksPass) args.push('--socks-pass', settings.socksPass); 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(' '); const commandLine = [exe, ...args].map((s) => (/\s/.test(s) ? `"${s}"` : s)).join(' ');
send(IPC.LOG, `[main] spawning: ${commandLine}\n`); 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" "$ROOT/build-joiners.sh"
echo "" echo ""
echo "=== Building Windows joiner (Go binary + wintun.dll) ===" echo "=== Building desktop joiner (Windows + Linux Go binaries + wintun.dll) ==="
"$ROOT/build-windows-joiner.sh" "$ROOT/build-desktop-joiner.sh"
echo "" echo ""
echo "=== Building Linux headless-vk-bot ===" echo "=== Building Linux headless-vk-bot ==="
@@ -35,6 +35,8 @@ else
echo "=== Skipping iOS build (requires macOS) ===" echo "=== Skipping iOS build (requires macOS) ==="
fi fi
"$ROOT/clean-prebuilts.sh"
echo "" echo ""
echo "=== Release complete ===" echo "=== Release complete ==="
ls -lh "$PREBUILTS/" ls -lh "$PREBUILTS/"