Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for TUN-only mode #2143

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions client/electron/go_vpn_tunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,16 @@ export class GoVpnTunnel implements VpnTunnel {
console.log('starting routing daemon');
await Promise.all([
this.tun2socks.start(this.isUdpEnabled),
this.routing.start(),
// Disable routing for TUN-only mode. You will still have to set up the TUN device:
//
// sudo ip tuntap add dev outline-tun0 mode tun
// sudo ip link set outline-tun0 up
//
// Then you can test with:
//
// curl --interface outline-tun0 -v https://ipinfo.io
//
// this.routing.start(),
]);
}

Expand Down Expand Up @@ -200,13 +209,14 @@ export class GoVpnTunnel implements VpnTunnel {
}
}

try {
await this.routing.stop();
} catch (e) {
// This can happen for several reasons, e.g. the daemon may have stopped while we were
// connected.
console.error(`could not stop routing: ${e.message}`);
}
// Disable for TUN-only mode.
// try {
// await this.routing.stop();
// } catch (e) {
// // This can happen for several reasons, e.g. the daemon may have stopped while we were
// // connected.
// console.error(`could not stop routing: ${e.message}`);
// }
this.resolveAllHelpersStopped();
this.disconnected = true;
}
Expand Down
Loading