diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-08-18 13:37:46 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-08-18 13:37:46 +0200 |
| commit | 3f4430ea27c56efdc524276a6c4e02e8080b52d4 (patch) | |
| tree | d5cca3468c47365f4b6dcff93c36703533489e4a /gui/src/main | |
| parent | 6bcea0fd559988f94962bb23c159ba1b211b17bd (diff) | |
| parent | b43b45007fb69430b502a443c18bcd4c96aa0f91 (diff) | |
| download | mullvadvpn-3f4430ea27c56efdc524276a6c4e02e8080b52d4.tar.xz mullvadvpn-3f4430ea27c56efdc524276a6c4e02e8080b52d4.zip | |
Merge branch 'filter-by-provider'
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/daemon-rpc.ts | 11 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts index 28b8e651dc..1c3e9a67ba 100644 --- a/gui/src/main/daemon-rpc.ts +++ b/gui/src/main/daemon-rpc.ts @@ -293,6 +293,12 @@ export class DaemonRpc { ); } + if (settingsUpdate.providers) { + const providerUpdate = new grpcTypes.ProviderUpdate(); + providerUpdate.setProvidersList(settingsUpdate.providers); + normalUpdate.setProviders(providerUpdate); + } + grpcRelaySettings.setNormal(normalUpdate); await this.call<grpcTypes.RelaySettingsUpdate, Empty>( this.client.updateRelaySettings, @@ -924,6 +930,7 @@ function convertFromRelaySettings( ? { only: convertFromLocation(grpcLocation.toObject()) } : 'any'; const tunnelProtocol = convertFromTunnelTypeConstraint(normal.getTunnelType()!); + const providers = normal.getProvidersList(); const openvpnConstraints = convertFromOpenVpnConstraints(normal.getOpenvpnConstraints()!); const wireguardConstraints = convertFromWireguardConstraints( normal.getWireguardConstraints()!, @@ -933,6 +940,7 @@ function convertFromRelaySettings( normal: { location, tunnelProtocol, + providers, wireguardConstraints, openvpnConstraints, }, @@ -951,9 +959,11 @@ function convertFromBridgeSettings( if (normalSettings) { const grpcLocation = normalSettings.location; const location = grpcLocation ? { only: convertFromLocation(grpcLocation) } : 'any'; + const providers = normalSettings.providersList; return { normal: { location, + providers, }, }; } @@ -1177,6 +1187,7 @@ function convertToNormalBridgeSettings( ): grpcTypes.BridgeSettings.BridgeConstraints { const normalBridgeSettings = new grpcTypes.BridgeSettings.BridgeConstraints(); normalBridgeSettings.setLocation(convertToLocation(liftConstraint(constraints.location))); + normalBridgeSettings.setProvidersList(constraints.providers); return normalBridgeSettings; } diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index a81324fd27..95771c5878 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -136,6 +136,7 @@ class ApplicationMain { normal: { location: 'any', tunnelProtocol: 'any', + providers: [], openvpnConstraints: { port: 'any', protocol: 'any', @@ -148,6 +149,7 @@ class ApplicationMain { bridgeSettings: { normal: { location: 'any', + providers: [], }, }, bridgeState: 'auto', |
