Skip to content

Commit

Permalink
fix(client/linux): update TUN and IP to avoid conflicts with legacy r…
Browse files Browse the repository at this point in the history
…outing (#2355)
  • Loading branch information
jyyi1 authored Feb 1, 2025
1 parent de32ebc commit 0fef7d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions client/electron/vpn_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,21 @@ interface EstablishVpnRequest {

export async function establishVpn(request: StartRequestJson) {
const config: EstablishVpnRequest = {
// The following VPN configuration ensures that the new routing can co-exist with any legacy Outline routings (e.g. AppImage).
vpn: {
id: request.id,

// TUN device name, being compatible with old code:
// TUN device name, use 'outline-tun1' to avoid conflict with old 'outline-tun0':
// https://github.com/Jigsaw-Code/outline-apps/blob/client/linux/v1.14.0/client/electron/linux_proxy_controller/outline_proxy_controller.h#L203
interfaceName: 'outline-tun0',
interfaceName: 'outline-tun1',

// Network Manager connection name, Use "TUN Connection" instead of "VPN Connection"
// because Network Manager has a dedicated "VPN Connection" concept that we did not implement
connectionName: 'Outline TUN Connection',

// TUN IP, being compatible with old code:
// TUN IP, use '10.0.85.5' to avoid conflict with old '10.0.85.1':
// https://github.com/Jigsaw-Code/outline-apps/blob/client/linux/v1.14.0/client/electron/linux_proxy_controller/outline_proxy_controller.h#L204
ipAddress: '10.0.85.1',
ipAddress: '10.0.85.5',

// DNS server list, being compatible with old code:
// https://github.com/Jigsaw-Code/outline-apps/blob/client/linux/v1.14.0/client/electron/linux_proxy_controller/outline_proxy_controller.h#L207
Expand Down
2 changes: 1 addition & 1 deletion client/go/outline/vpn/vpn_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *linuxVPNConn) Establish(ctx context.Context) (err error) {
}

if c.tun, err = newTUNDevice(c.nmOpts.TUNName); err != nil {
return errSetupVPN("failed to create tun device", err, "name", c.nmOpts.Name)
return errSetupVPN("failed to create tun device", err, "name", c.nmOpts.TUNName)
}
slog.Info("tun device created", "name", c.nmOpts.TUNName)

Expand Down

0 comments on commit 0fef7d5

Please sign in to comment.