diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/shared/daemon-rpc-types.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts index 108f6dc98f..891c06c8b9 100644 --- a/gui/src/shared/daemon-rpc-types.ts +++ b/gui/src/shared/daemon-rpc-types.ts @@ -33,10 +33,30 @@ 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; |
