summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/shared')
-rw-r--r--gui/src/shared/daemon-rpc-types.ts25
1 files changed, 23 insertions, 2 deletions
diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts
index 3225995e75..891c06c8b9 100644
--- a/gui/src/shared/daemon-rpc-types.ts
+++ b/gui/src/shared/daemon-rpc-types.ts
@@ -12,6 +12,7 @@ export interface ILocation {
longitude: number;
mullvadExitIp: boolean;
hostname?: string;
+ bridgeHostname?: string;
}
export type BlockReason =
@@ -32,22 +33,42 @@ export type AfterDisconnect = 'nothing' | 'block' | 'reconnect';
export type TunnelState = 'connecting' | 'connected' | 'disconnecting' | 'disconnected' | 'blocked';
export type TunnelType = 'wireguard' | 'openvpn';
+export function tunnelTypeToString(tunnel: TunnelType): string {
+ switch (tunnel) {
+ case 'wireguard':
+ return 'WireGuard';
+ case 'openvpn':
+ return 'OpenVPN';
+ default:
+ return '';
+ }
+}
export type RelayProtocol = 'tcp' | 'udp';
export type ProxyType = 'shadowsocks' | 'custom';
+export function proxyTypeToString(proxy: ProxyType): string {
+ switch (proxy) {
+ case 'shadowsocks':
+ return 'Shadowsocks';
+ case 'custom':
+ return 'Custom';
+ default:
+ return '';
+ }
+}
export interface ITunnelEndpoint {
address: string;
protocol: RelayProtocol;
- tunnel: TunnelType;
+ tunnelType: TunnelType;
proxy?: IProxyEndpoint;
}
export interface IProxyEndpoint {
address: string;
protocol: RelayProtocol;
- proxy_type: ProxyType;
+ proxyType: ProxyType;
}
export type DaemonEvent =