diff options
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, |
