summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2024-12-02 08:50:00 +0100
committerBug Magnet <marco.nikic@mullvad.net>2024-12-02 08:50:00 +0100
commite3399d9c39a07c828e4b8252a43d3de6f261ca24 (patch)
tree76f351b53e116dcd3d0fa2282a5e678dc11fc498
parent5e5bc4e4ac5ce140e651bf1e509663fca4f56cc1 (diff)
parente35296c9b36e044055b99664ef3f3a93802a0027 (diff)
downloadmullvadvpn-e3399d9c39a07c828e4b8252a43d3de6f261ca24.tar.xz
mullvadvpn-e3399d9c39a07c828e4b8252a43d3de6f261ca24.zip
Merge branch 'FixShadowsockTypo'
-rw-r--r--ios/MullvadREST/Relay/ObfuscatorPortSelector.swift2
-rw-r--r--ios/MullvadSettings/WireGuardObfuscationSettings.swift8
-rw-r--r--ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift4
-rw-r--r--ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsViewModel.swift8
-rw-r--r--ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift4
5 files changed, 13 insertions, 13 deletions
diff --git a/ios/MullvadREST/Relay/ObfuscatorPortSelector.swift b/ios/MullvadREST/Relay/ObfuscatorPortSelector.swift
index 152cf6b638..e6ca92f4f7 100644
--- a/ios/MullvadREST/Relay/ObfuscatorPortSelector.swift
+++ b/ios/MullvadREST/Relay/ObfuscatorPortSelector.swift
@@ -59,7 +59,7 @@ struct ObfuscatorPortSelector {
private func filterShadowsocksRelays(
from relays: REST.ServerRelaysResponse,
- for port: WireGuardObfuscationShadowsockPort
+ for port: WireGuardObfuscationShadowsocksPort
) -> REST.ServerRelaysResponse {
let portRanges = RelaySelector.parseRawPortRanges(relays.wireguard.shadowsocksPortRanges)
diff --git a/ios/MullvadSettings/WireGuardObfuscationSettings.swift b/ios/MullvadSettings/WireGuardObfuscationSettings.swift
index e8679fb0c4..f067114cc6 100644
--- a/ios/MullvadSettings/WireGuardObfuscationSettings.swift
+++ b/ios/MullvadSettings/WireGuardObfuscationSettings.swift
@@ -81,7 +81,7 @@ public enum WireGuardObfuscationUdpOverTcpPort: Codable, Equatable, CustomString
}
}
-public enum WireGuardObfuscationShadowsockPort: Codable, Equatable, CustomStringConvertible {
+public enum WireGuardObfuscationShadowsocksPort: Codable, Equatable, CustomStringConvertible {
case automatic
case custom(UInt16)
@@ -126,12 +126,12 @@ public struct WireGuardObfuscationSettings: Codable, Equatable {
public var state: WireGuardObfuscationState
public var udpOverTcpPort: WireGuardObfuscationUdpOverTcpPort
- public var shadowsocksPort: WireGuardObfuscationShadowsockPort
+ public var shadowsocksPort: WireGuardObfuscationShadowsocksPort
public init(
state: WireGuardObfuscationState = .automatic,
udpOverTcpPort: WireGuardObfuscationUdpOverTcpPort = .automatic,
- shadowsocksPort: WireGuardObfuscationShadowsockPort = .automatic
+ shadowsocksPort: WireGuardObfuscationShadowsocksPort = .automatic
) {
self.state = state
self.udpOverTcpPort = udpOverTcpPort
@@ -143,7 +143,7 @@ public struct WireGuardObfuscationSettings: Codable, Equatable {
state = try container.decode(WireGuardObfuscationState.self, forKey: .state)
shadowsocksPort = try container.decodeIfPresent(
- WireGuardObfuscationShadowsockPort.self,
+ WireGuardObfuscationShadowsocksPort.self,
forKey: .shadowsocksPort
) ?? .automatic
diff --git a/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift b/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift
index 3c402a8605..e5434b06e7 100644
--- a/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift
+++ b/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsView.swift
@@ -22,7 +22,7 @@ struct ShadowsocksObfuscationSettingsView<VM>: View where VM: ShadowsocksObfusca
SingleChoiceList(
title: portString,
- options: [WireGuardObfuscationShadowsockPort.automatic],
+ options: [WireGuardObfuscationShadowsocksPort.automatic],
value: $viewModel.value,
itemDescription: { item in NSLocalizedString(
"SHADOWSOCKS_PORT_VALUE_\(item)",
@@ -30,7 +30,7 @@ struct ShadowsocksObfuscationSettingsView<VM>: View where VM: ShadowsocksObfusca
value: "\(item)",
comment: ""
) },
- parseCustomValue: { UInt16($0).flatMap { $0 > 0 ? WireGuardObfuscationShadowsockPort.custom($0) : nil }
+ parseCustomValue: { UInt16($0).flatMap { $0 > 0 ? WireGuardObfuscationShadowsocksPort.custom($0) : nil }
},
formatCustomValue: {
if case let .custom(port) = $0 {
diff --git a/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsViewModel.swift b/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsViewModel.swift
index 4d917496a6..b0a4aa3eab 100644
--- a/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsViewModel.swift
+++ b/ios/MullvadVPN/View controllers/Settings/Obfuscation/ShadowsocksObfuscationSettingsViewModel.swift
@@ -10,16 +10,16 @@ import Foundation
import MullvadSettings
protocol ShadowsocksObfuscationSettingsViewModel: ObservableObject {
- var value: WireGuardObfuscationShadowsockPort { get set }
+ var value: WireGuardObfuscationShadowsocksPort { get set }
func commit()
}
/** A simple mock view model for use in Previews and similar */
class MockShadowsocksObfuscationSettingsViewModel: ShadowsocksObfuscationSettingsViewModel {
- @Published var value: WireGuardObfuscationShadowsockPort
+ @Published var value: WireGuardObfuscationShadowsocksPort
- init(shadowsocksPort: WireGuardObfuscationShadowsockPort = .automatic) {
+ init(shadowsocksPort: WireGuardObfuscationShadowsocksPort = .automatic) {
self.value = shadowsocksPort
}
@@ -28,7 +28,7 @@ class MockShadowsocksObfuscationSettingsViewModel: ShadowsocksObfuscationSetting
/// ** The live view model which interfaces with the TunnelManager */
class TunnelShadowsocksObfuscationSettingsViewModel: TunnelObfuscationSettingsWatchingObservableObject<
- WireGuardObfuscationShadowsockPort
+ WireGuardObfuscationShadowsocksPort
>,
ShadowsocksObfuscationSettingsViewModel {
init(tunnelManager: TunnelManager) {
diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift
index c2d8788ce3..ae18c6a034 100644
--- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift
+++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift
@@ -98,7 +98,7 @@ struct VPNSettingsViewModel: Equatable {
private(set) var obfuscationState: WireGuardObfuscationState
private(set) var obfuscationUpdOverTcpPort: WireGuardObfuscationUdpOverTcpPort
- private(set) var obfuscationShadowsocksPort: WireGuardObfuscationShadowsockPort
+ private(set) var obfuscationShadowsocksPort: WireGuardObfuscationShadowsocksPort
private(set) var quantumResistance: TunnelQuantumResistance
private(set) var multihopState: MultihopState
@@ -179,7 +179,7 @@ struct VPNSettingsViewModel: Equatable {
obfuscationState = newState
}
- mutating func setWireGuardObfuscationShadowsockPort(_ newPort: WireGuardObfuscationShadowsockPort) {
+ mutating func setWireGuardObfuscationShadowsockPort(_ newPort: WireGuardObfuscationShadowsocksPort) {
obfuscationShadowsocksPort = newPort
}