diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-04-28 10:56:25 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-04-28 10:57:42 +0200 |
| commit | 05ed04ec3ddc6d7f5d74397d7956bee36df70524 (patch) | |
| tree | c3b8aee14c79ef60428293b5e2fd75b9d180b5cf /gui/src/main | |
| parent | fa4876768cd889b4a7b951d3be607f87b65323d1 (diff) | |
| download | mullvadvpn-05ed04ec3ddc6d7f5d74397d7956bee36df70524.tar.xz mullvadvpn-05ed04ec3ddc6d7f5d74397d7956bee36df70524.zip | |
Show obfuscation endpoint as in-data
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/daemon-rpc.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts index 029936093f..39e9d48f21 100644 --- a/gui/src/main/daemon-rpc.ts +++ b/gui/src/main/daemon-rpc.ts @@ -27,6 +27,7 @@ import { IDnsOptions, IErrorState, ILocation, + IObfuscationEndpoint, IOpenVpnConstraints, IOpenVpnTunnelData, IProxyEndpoint, @@ -40,6 +41,7 @@ import { ITunnelStateRelayInfo, IWireguardConstraints, IWireguardTunnelData, + ObfuscationType, ProxySettings, ProxyType, RelayLocation, @@ -899,6 +901,9 @@ function convertFromTunnelStateRelayInfo( tunnelType: convertFromTunnelType(state.tunnelEndpoint.tunnelType), protocol: convertFromTransportProtocol(state.tunnelEndpoint.protocol), proxy: state.tunnelEndpoint.proxy && convertFromProxyEndpoint(state.tunnelEndpoint.proxy), + obfuscationEndpoint: + state.tunnelEndpoint.obfuscation && + convertFromObfuscationEndpoint(state.tunnelEndpoint.obfuscation), entryEndpoint: state.tunnelEndpoint.entryEndpoint && convertFromEntryEndpoint(state.tunnelEndpoint.entryEndpoint), @@ -930,6 +935,20 @@ function convertFromProxyEndpoint(proxyEndpoint: grpcTypes.ProxyEndpoint.AsObjec }; } +function convertFromObfuscationEndpoint( + obfuscationEndpoint: grpcTypes.ObfuscationEndpoint.AsObject, +): IObfuscationEndpoint { + const obfuscationTypes: Record<grpcTypes.ObfuscationType, ObfuscationType> = { + [grpcTypes.ObfuscationType.UDP2TCP]: 'udp2tcp', + }; + + return { + ...obfuscationEndpoint, + protocol: convertFromTransportProtocol(obfuscationEndpoint.protocol), + obfuscationType: obfuscationTypes[obfuscationEndpoint.obfuscationType], + }; +} + function convertFromEntryEndpoint(entryEndpoint: grpcTypes.Endpoint.AsObject) { return { address: entryEndpoint.address, |
