diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-11-05 17:15:33 +0100 |
|---|---|---|
| committer | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-11-05 17:25:00 +0100 |
| commit | aa7aa283e91141a4f356447d041cc2022613538b (patch) | |
| tree | 909460fdb34cae7948ef918d30bab2e4efb200e5 | |
| parent | 0fc024717c32f1027d1d36b3132d6cd71152dd63 (diff) | |
| download | mullvadvpn-implement-frontend-remove-port-from-constraint.tar.xz mullvadvpn-implement-frontend-remove-port-from-constraint.zip | |
Remove wireguard port property from relay settingsimplement-frontend-remove-port-from-constraint
It has been replaced by the new wireguard port property in the
obfuscation settings.
6 files changed, 1 insertions, 18 deletions
diff --git a/desktop/packages/mullvad-vpn/src/main/default-settings.ts b/desktop/packages/mullvad-vpn/src/main/default-settings.ts index a42872aaae..f60ecd89dd 100644 --- a/desktop/packages/mullvad-vpn/src/main/default-settings.ts +++ b/desktop/packages/mullvad-vpn/src/main/default-settings.ts @@ -12,7 +12,6 @@ export function getDefaultRelaySettingsNormal(): IRelaySettingsNormal { providers: [], ownership: Ownership.any, wireguardConstraints: { - port: 'any', ipVersion: 'any', useMultihop: false, entryLocation: 'any', diff --git a/desktop/packages/mullvad-vpn/src/main/grpc-type-convertions.ts b/desktop/packages/mullvad-vpn/src/main/grpc-type-convertions.ts index db96fd3793..42d1782b62 100644 --- a/desktop/packages/mullvad-vpn/src/main/grpc-type-convertions.ts +++ b/desktop/packages/mullvad-vpn/src/main/grpc-type-convertions.ts @@ -835,17 +835,11 @@ function convertFromWireguardConstraints( constraints: grpcTypes.WireguardConstraints, ): IWireguardConstraints { const result: IWireguardConstraints = { - port: 'any', ipVersion: 'any', useMultihop: constraints.getUseMultihop(), entryLocation: 'any', }; - const port = constraints.getPort(); - if (port) { - result.port = { only: port }; - } - // `getIpVersion()` is not falsy if type is 'any' if (constraints.hasIpVersion()) { switch (constraints.getIpVersion()) { @@ -938,11 +932,6 @@ function convertToWireguardConstraints( if (constraint) { const wireguardConstraints = new grpcTypes.WireguardConstraints(); - const port = unwrapConstraint(constraint.port); - if (port) { - wireguardConstraints.setPort(port); - } - const ipVersion = unwrapConstraint(constraint.ipVersion); if (ipVersion) { const ipVersionProtocol = diff --git a/desktop/packages/mullvad-vpn/src/renderer/app.tsx b/desktop/packages/mullvad-vpn/src/renderer/app.tsx index 2ad5b5d5e8..3cad035ea4 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/app.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/app.tsx @@ -739,7 +739,6 @@ export default class AppRenderer { providers, ownership, wireguard: { - port: liftConstraint(wireguardConstraints.port), ipVersion: liftConstraint(wireguardConstraints.ipVersion), useMultihop: wireguardConstraints.useMultihop, entryLocation: liftConstraint(wireguardConstraints.entryLocation), diff --git a/desktop/packages/mullvad-vpn/src/renderer/lib/constraint-updater.ts b/desktop/packages/mullvad-vpn/src/renderer/lib/constraint-updater.ts index 124322f471..2901e386d7 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/lib/constraint-updater.ts +++ b/desktop/packages/mullvad-vpn/src/renderer/lib/constraint-updater.ts @@ -21,7 +21,6 @@ export function wrapRelaySettingsOrDefault( relaySettings?: NormalRelaySettingsRedux, ): IRelaySettingsNormal { if (relaySettings) { - const wgPort = wrapConstraint(relaySettings.wireguard.port); const wgIpVersion = wrapConstraint(relaySettings.wireguard.ipVersion); const wgEntryLocation = wrapConstraint(relaySettings.wireguard.entryLocation); const location = wrapConstraint(relaySettings.location); @@ -30,7 +29,6 @@ export function wrapRelaySettingsOrDefault( providers: [...relaySettings.providers], ownership: relaySettings.ownership, wireguardConstraints: { - port: wgPort, ipVersion: wgIpVersion, useMultihop: relaySettings.wireguard.useMultihop, entryLocation: wgEntryLocation, diff --git a/desktop/packages/mullvad-vpn/src/renderer/redux/settings/reducers.ts b/desktop/packages/mullvad-vpn/src/renderer/redux/settings/reducers.ts index c89a8eb0fc..460b9cfd91 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/redux/settings/reducers.ts +++ b/desktop/packages/mullvad-vpn/src/renderer/redux/settings/reducers.ts @@ -29,7 +29,6 @@ export type NormalRelaySettingsRedux = { providers: string[]; ownership: Ownership; wireguard: { - port: LiftedConstraint<number>; ipVersion: LiftedConstraint<IpVersion>; useMultihop: boolean; entryLocation: LiftedConstraint<RelayLocation>; @@ -136,7 +135,7 @@ const initialState: ISettingsReduxState = { location: 'any', providers: [], ownership: Ownership.any, - wireguard: { port: 'any', ipVersion: 'any', useMultihop: false, entryLocation: 'any' }, + wireguard: { ipVersion: 'any', useMultihop: false, entryLocation: 'any' }, }, }, relayLocations: [], diff --git a/desktop/packages/mullvad-vpn/src/shared/daemon-rpc-types.ts b/desktop/packages/mullvad-vpn/src/shared/daemon-rpc-types.ts index f08db80d37..9ceee0365f 100644 --- a/desktop/packages/mullvad-vpn/src/shared/daemon-rpc-types.ts +++ b/desktop/packages/mullvad-vpn/src/shared/daemon-rpc-types.ts @@ -281,7 +281,6 @@ export type RelayLocationGeographical = export type RelayLocation = RelayLocationGeographical | RelayLocationCustomList; export interface IWireguardConstraints { - port: Constraint<number>; ipVersion: Constraint<IpVersion>; useMultihop: boolean; entryLocation: Constraint<RelayLocation>; |
