Skip to content

Commit

Permalink
fix(client/electron): properly link tun2socks binary (#1936)
Browse files Browse the repository at this point in the history
* init commit

* revert this

* Update app_paths.ts

* Update go_vpn_tunnel.ts
  • Loading branch information
daniellacosse authored Mar 27, 2024
1 parent bd590b3 commit 6aaaf70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/electron/go_vpn_tunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class GoTun2socks {
private readonly process: ChildProcessHelper;

constructor(private readonly config: ShadowsocksSessionConfig) {
this.process = new ChildProcessHelper(pathToEmbeddedBinary('outline-go-tun2socks', 'tun2socks'));
this.process = new ChildProcessHelper(pathToEmbeddedBinary('tun2socks'));
}

async start(isUdpEnabled: boolean): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions src/infrastructure/electron/app_paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ export function getAppPath() {
return electronAppPath;
}

export function pathToEmbeddedBinary(toolname: string, filename: string) {
return path.join(unpackedAppPath(), 'third_party', toolname, os.platform(), filename + (isWindows ? '.exe' : ''));
export function pathToEmbeddedBinary(filename: string) {
return path.join(unpackedAppPath(), 'output', 'build', os.platform(), filename + (isWindows ? '.exe' : ''));
}

0 comments on commit 6aaaf70

Please sign in to comment.