linux joiner
This commit is contained in:
1 parent
30ed29a161
commit
18358c8927
17 files changed
+185
-86
No files matched your search
@@ -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
-2
@@ -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
|
||||
|
||||
File renamed without changes.
+7
-8
@@ -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 (
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Reference in new issue
Block a user