summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-02-02 14:10:34 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-02-02 16:30:59 +0100
commitae7895ecb2b18a16e620f5c5ce487754280720db (patch)
treebcfdb14d6221a8a69f0917b6c3b3e61723590261 /gui/src
parentff5ade18bbb7cd0cc0700e564b7b04bd45901287 (diff)
downloadmullvadvpn-ae7895ecb2b18a16e620f5c5ce487754280720db.tar.xz
mullvadvpn-ae7895ecb2b18a16e620f5c5ce487754280720db.zip
Add entry location to connecting state before connecint event
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/renderer/app.tsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 56ac8887d4..f5134653a7 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -933,10 +933,21 @@ export default class AppRenderer {
const country = relayLocations.find(({ code }) => constraint.hostname[0] === code);
const city = country?.cities.find((location) => location.code === constraint.hostname[1]);
+ let entryHostname: string | undefined;
+ const entryLocationConstraint = relaySettings.normal.wireguardConstraints.entryLocation;
+ if (
+ entryLocationConstraint !== 'any' &&
+ 'hostname' in entryLocationConstraint.only &&
+ entryLocationConstraint.only.hostname.length === 3
+ ) {
+ entryHostname = entryLocationConstraint.only.hostname[2];
+ }
+
return {
country: country?.name,
city: city?.name,
hostname: constraint.hostname[2],
+ entryHostname,
...coordinates,
};
}