summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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,
};
}