summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2024-04-08 16:58:19 +0200
committerOskar Nyberg <oskar@mullvad.net>2024-04-11 17:21:23 +0200
commitea2c847d41183eed302c1c9994a06bd55454e252 (patch)
tree413e390a85d4e56e71c9a253bf1fa279f0335a9d /gui/src/renderer
parent49c21c0a391e1bb48e8400451263b07f31e97c1f (diff)
downloadmullvadvpn-ea2c847d41183eed302c1c9994a06bd55454e252.tar.xz
mullvadvpn-ea2c847d41183eed302c1c9994a06bd55454e252.zip
Display custom bridge correctly in ConnectionPanel
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/components/ConnectionPanel.tsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/gui/src/renderer/components/ConnectionPanel.tsx b/gui/src/renderer/components/ConnectionPanel.tsx
index 07547363a0..a99140bb43 100644
--- a/gui/src/renderer/components/ConnectionPanel.tsx
+++ b/gui/src/renderer/components/ConnectionPanel.tsx
@@ -6,7 +6,6 @@ import { colors } from '../../config.json';
import {
EndpointObfuscationType,
ProxyType,
- proxyTypeToString,
RelayProtocol,
TunnelType,
tunnelTypeToString,
@@ -164,10 +163,9 @@ export default class ConnectionPanel extends React.Component<IProps> {
entry: this.props.entryHostname,
},
);
- } else if (this.props.bridgeInfo?.ip) {
- return sprintf(messages.pgettext('connection-info', '%(relay)s via %(entry)s'), {
+ } else if (this.props.bridgeInfo !== undefined) {
+ return sprintf(messages.pgettext('connection-info', '%(relay)s via Custom bridge'), {
relay: this.props.hostname,
- entry: this.props.bridgeInfo.ip,
});
} else {
return this.props.hostname || '';
@@ -181,7 +179,7 @@ export default class ConnectionPanel extends React.Component<IProps> {
const tunnelType = tunnelTypeToString(inAddress.tunnelType);
if (bridgeInfo) {
- const bridgeType = proxyTypeToString(bridgeInfo.bridgeType);
+ const bridgeType = this.bridgeType();
return sprintf(
// TRANSLATORS: The tunnel type line displayed below the hostname line on the main screen
@@ -201,4 +199,12 @@ export default class ConnectionPanel extends React.Component<IProps> {
return '';
}
}
+
+ private bridgeType() {
+ if (this.props.bridgeHostname && this.props.bridgeInfo?.bridgeType === 'shadowsocks') {
+ return 'Shadowsocks bridge';
+ } else {
+ return 'Custom bridge';
+ }
+ }
}