diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-09-12 13:33:46 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-09-12 13:46:04 +0200 |
| commit | 4ed0102b38aa29bee9b0a876ec48c48d715f644e (patch) | |
| tree | 4c3334ed98f97b2c83c9b49f448c790810a5f835 /app/lib/ipc-facade.js | |
| parent | d541f4ee98182faa6c4e52727c948612b4d7ad53 (diff) | |
| download | mullvadvpn-4ed0102b38aa29bee9b0a876ec48c48d715f644e.tar.xz mullvadvpn-4ed0102b38aa29bee9b0a876ec48c48d715f644e.zip | |
Move the hardcoded relay endpoint data to the Connect component
Diffstat (limited to 'app/lib/ipc-facade.js')
| -rw-r--r-- | app/lib/ipc-facade.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js index 0a9ceebf65..736d4fc31c 100644 --- a/app/lib/ipc-facade.js +++ b/app/lib/ipc-facade.js @@ -25,13 +25,19 @@ export type BackendState = { state: SecurityState, target_state: SecurityState, }; +export type RelayEndpoint = { + host: string, + port: number, + protocol: 'tcp' | 'udp', +}; + export interface IpcFacade { setConnectionString(string): void, getAccountData(AccountToken): Promise<AccountData>, getAccount(): Promise<?AccountToken>, setAccount(accountToken: AccountToken): Promise<void>, - setCustomRelay(host: string, port: number, protocol: 'udp' | 'tcp'): Promise<void>, + setCustomRelay(RelayEndpoint): Promise<void>, connect(): Promise<void>, disconnect(): Promise<void>, getIp(): Promise<Ip>, @@ -86,12 +92,8 @@ export class RealIpc implements IpcFacade { return; } - setCustomRelay(host: string, port: number, protocol: 'udp' | 'tcp'): Promise<void> { - return this._ipc.send('set_custom_relay', { - host, - port, - protocol, - }) + setCustomRelay(relayEndpoint: RelayEndpoint): Promise<void> { + return this._ipc.send('set_custom_relay', [relayEndpoint]) .then(this._ignoreResponse); } |
