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/renderer/containers | |
| parent | fa4876768cd889b4a7b951d3be607f87b65323d1 (diff) | |
| download | mullvadvpn-05ed04ec3ddc6d7f5d74397d7956bee36df70524.tar.xz mullvadvpn-05ed04ec3ddc6d7f5d74397d7956bee36df70524.zip | |
Show obfuscation endpoint as in-data
Diffstat (limited to 'gui/src/renderer/containers')
| -rw-r--r-- | gui/src/renderer/containers/ConnectionPanelContainer.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gui/src/renderer/containers/ConnectionPanelContainer.tsx b/gui/src/renderer/containers/ConnectionPanelContainer.tsx index f55fa8cacd..5311f1a8e4 100644 --- a/gui/src/renderer/containers/ConnectionPanelContainer.tsx +++ b/gui/src/renderer/containers/ConnectionPanelContainer.tsx @@ -5,6 +5,7 @@ import { ITunnelEndpoint, parseSocketAddress } from '../../shared/daemon-rpc-typ import ConnectionPanel, { IBridgeData, IInAddress, + IObfuscationData, IOutAddress, } from '../components/ConnectionPanel'; import { IReduxState, ReduxDispatch } from '../redux/store'; @@ -50,6 +51,21 @@ function tunnelEndpointToBridgeData(endpoint: ITunnelEndpoint): IBridgeData | un }; } +function tunnelEndpointToObfuscationEndpoint( + endpoint: ITunnelEndpoint, +): IObfuscationData | undefined { + if (!endpoint.obfuscationEndpoint) { + return undefined; + } + + return { + ip: endpoint.obfuscationEndpoint.address, + port: endpoint.obfuscationEndpoint.port, + protocol: endpoint.obfuscationEndpoint.protocol, + obfuscationType: endpoint.obfuscationEndpoint.obfuscationType, + }; +} + const mapStateToProps = (state: IReduxState) => { const status = state.connection.status; @@ -73,6 +89,11 @@ const mapStateToProps = (state: IReduxState) => { ? tunnelEndpointToBridgeData(status.details.endpoint) : undefined; + const obfuscationEndpoint: IObfuscationData | undefined = + (status.state === 'connecting' || status.state === 'connected') && status.details + ? tunnelEndpointToObfuscationEndpoint(status.details.endpoint) + : undefined; + return { isOpen: state.userInterface.connectionPanelVisible, hostname: state.connection.hostname, @@ -82,6 +103,7 @@ const mapStateToProps = (state: IReduxState) => { entryLocationInAddress, bridgeInfo, outAddress, + obfuscationEndpoint, }; }; |
