diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-08-05 11:08:23 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-08-22 08:34:37 +0200 |
| commit | b5bfaa7bc50a7055ed1e562086ac3ed099e0d36a (patch) | |
| tree | 170b4229ec413c457600ff3ea5108c6dba4fb526 /gui/src | |
| parent | 5890d65e59919356fd257e2a8d21630ec5cc7260 (diff) | |
| download | mullvadvpn-b5bfaa7bc50a7055ed1e562086ac3ed099e0d36a.tar.xz mullvadvpn-b5bfaa7bc50a7055ed1e562086ac3ed099e0d36a.zip | |
Move daemon UDS path to daemon-rpc
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/daemon-rpc.ts | 7 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts index 646a09a9c7..c80a49dc10 100644 --- a/gui/src/main/daemon-rpc.ts +++ b/gui/src/main/daemon-rpc.ts @@ -67,6 +67,9 @@ import { import { ManagementServiceClient } from './management_interface/management_interface_grpc_pb'; import * as grpcTypes from './management_interface/management_interface_pb'; +const DAEMON_RPC_PATH = + process.platform === 'win32' ? 'unix:////./pipe/Mullvad VPN' : 'unix:///var/run/mullvad-vpn'; + const NETWORK_CALL_TIMEOUT = 10000; const CHANNEL_STATE_TIMEOUT = 1000 * 60 * 60; @@ -133,9 +136,9 @@ export class DaemonRpc { private subscriptions: Map<number, grpc.ClientReadableStream<grpcTypes.DaemonEvent>> = new Map(); private reconnectionTimeout?: NodeJS.Timer; - constructor(connectionParams: string) { + constructor() { this.client = new ManagementServiceClient( - connectionParams, + DAEMON_RPC_PATH, grpc.credentials.createInsecure(), this.channelOptions(), ); diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 669f406c19..dca6c87fb3 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -94,9 +94,6 @@ const execAsync = util.promisify(exec); const linuxSplitTunneling = process.platform === 'linux' && require('./linux-split-tunneling'); const windowsSplitTunneling = process.platform === 'win32' && require('./windows-split-tunneling'); -const DAEMON_RPC_PATH = - process.platform === 'win32' ? 'unix:////./pipe/Mullvad VPN' : 'unix:///var/run/mullvad-vpn'; - const GUI_VERSION = app.getVersion().replace('.0', ''); /// Mirrors the beta check regex in the daemon. Matches only well formed beta versions const IS_BETA = /^(\d{4})\.(\d+)-beta(\d+)$/; @@ -134,7 +131,7 @@ class ApplicationMain { // hidden when losing focus. private browsingFiles = false; - private daemonRpc = new DaemonRpc(DAEMON_RPC_PATH); + private daemonRpc = new DaemonRpc(); private daemonEventListener?: SubscriptionListener<DaemonEvent>; private reconnectBackoff = new ReconnectionBackoff(); private beforeFirstDaemonConnection = true; |
