diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-08-20 15:04:27 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-08-20 15:04:27 +0200 |
| commit | 3e277b10f220d022726430cbed20fab4d6b1957d (patch) | |
| tree | b8d26480c9e4bae70eee19c9484e5e7ef85c882c /gui/src/shared | |
| parent | 9a67c39d37c042df4b9381bd101a369efd516880 (diff) | |
| parent | 857a4101f98b564caba1455aabf988eac8adc55e (diff) | |
| download | mullvadvpn-3e277b10f220d022726430cbed20fab4d6b1957d.tar.xz mullvadvpn-3e277b10f220d022726430cbed20fab4d6b1957d.zip | |
Merge branch 'tonic-management-interface'
Diffstat (limited to 'gui/src/shared')
| -rw-r--r-- | gui/src/shared/daemon-rpc-types.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts index 1f1779a4b0..78b6f60c17 100644 --- a/gui/src/shared/daemon-rpc-types.ts +++ b/gui/src/shared/daemon-rpc-types.ts @@ -46,14 +46,14 @@ export type ErrorStateCause = export type AfterDisconnect = 'nothing' | 'block' | 'reconnect'; -export type TunnelType = 'wireguard' | 'openvpn'; +export type TunnelType = 'any' | 'wireguard' | 'openvpn'; export function tunnelTypeToString(tunnel: TunnelType): string { switch (tunnel) { case 'wireguard': return 'WireGuard'; case 'openvpn': return 'OpenVPN'; - default: + case 'any': return ''; } } @@ -235,14 +235,16 @@ export interface IOpenVpnTunnelData { } export interface IWireguardTunnelData { - // Port ranges are an array of pairs, such as [[53,53], [10_000, 60_000]], - // which in this case translates that the specific tunnel can be connected on - // port 53 and ports 10'000 through 60'000. - portRanges: Array<[number, number]>; + portRanges: Array<IPortRange>; // Public key of the tunnel. publicKey: string; } +export interface IPortRange { + first: number; + last: number; +} + export interface IShadowsocksEndpointData { port: number; cipher: string; @@ -256,8 +258,6 @@ export interface ITunnelOptions { }; wireguard: { mtu?: number; - // Only relevant on Linux - fwmark?: number; }; generic: { enableIpv6: boolean; @@ -330,7 +330,7 @@ export interface ISocketAddress { } export type VoucherResponse = - | { type: 'success'; new_expiry: string } + | { type: 'success'; newExpiry: string; secondsAdded: number } | { type: 'invalid' | 'already_used' | 'error' }; export enum VoucherErrorCode { |
