summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/shared')
-rw-r--r--gui/src/shared/relay-settings-builder.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/gui/src/shared/relay-settings-builder.ts b/gui/src/shared/relay-settings-builder.ts
index 418de10888..e4c11e5132 100644
--- a/gui/src/shared/relay-settings-builder.ts
+++ b/gui/src/shared/relay-settings-builder.ts
@@ -3,6 +3,7 @@ import {
IOpenVpnConstraints,
IpVersion,
IWireguardConstraints,
+ RelayLocation,
RelayProtocol,
RelaySettingsNormalUpdate,
RelaySettingsUpdate,
@@ -23,6 +24,8 @@ interface IOpenVPNConfigurator {
interface IWireguardConfigurator {
port: IExactOrAny<number, IWireguardConfigurator>;
ipVersion: IExactOrAny<IpVersion, IWireguardConfigurator>;
+ useMultihop: (value: boolean) => IWireguardConfigurator;
+ entryLocation: IExactOrAny<RelayLocation, IWireguardConfigurator>;
}
interface ITunnelProtocolConfigurator {
@@ -137,6 +140,22 @@ class NormalRelaySettingsBuilder {
any: () => apply('any'),
};
},
+ get useMultihop() {
+ return (useMultihop: boolean) => {
+ updateWireguard({ useMultihop });
+ return this;
+ };
+ },
+ get entryLocation() {
+ const apply = (entryLocation: Constraint<RelayLocation> | undefined) => {
+ updateWireguard({ entryLocation });
+ return this;
+ };
+ return {
+ exact: (entryLocation: RelayLocation) => apply({ only: entryLocation }),
+ any: () => apply('any'),
+ };
+ },
};
configurator(wireguardBuilder);
return this;