Skip to content

Commit

Permalink
Remove Proxy SSL checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrebane committed Feb 15, 2024
1 parent 38f64af commit e38bbf4
Show file tree
Hide file tree
Showing 18 changed files with 790 additions and 598 deletions.
13 changes: 1 addition & 12 deletions MoppApp/MoppApp/DefaultsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ fileprivate let kSivaAccessState = "kSivaAccessState"
fileprivate let kSivaUrl = "kSivaUrl"
fileprivate let kSivaFileCertName = "kSivaFileCertName"
fileprivate let kProxySetting = "kProxySetting"
fileprivate let kIsProxyForSSLEnabled = "kIsProxyForSSLEnabled"
fileprivate let kProxyHost = "kProxyHost"
fileprivate let kProxyPort = "kProxyPort"
fileprivate let kProxyUsername = "kProxyUsername"
Expand All @@ -93,8 +92,7 @@ class DefaultsHelper
kFirstStartKey: true,
kSettingsDefaultSwitchKey: true,
kMobileIdRememberMeKey: true,
kSmartIdRememberMeKey: true,
kIsProxyForSSLEnabled: true
kSmartIdRememberMeKey: true
]
)
}
Expand Down Expand Up @@ -364,15 +362,6 @@ class DefaultsHelper
}
}

class var isProxyForSSLEnabled: Bool {
set {
UserDefaults.standard.set(newValue, forKey: kIsProxyForSSLEnabled)
}
get {
return UserDefaults.standard.bool(forKey: kIsProxyForSSLEnabled)
}
}

class var proxyHost: String? {
set {
UserDefaults.standard.set(newValue, forKey: kProxyHost)
Expand Down
2 changes: 1 addition & 1 deletion MoppApp/MoppApp/LocalizationKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ enum LocKey : String
case settingsProxyPort = "settings-proxy-port"
case settingsProxyUsername = "settings-proxy-username"
case settingsProxyPassword = "settings-proxy-password"
case settingsProxyAllowSSL = "settings-proxy-allow-ssl"
case settingsSivaDefaultAccessTitle = "settings-siva-default-access-title"
case settingsSivaDefaultManualAccessTitle = "settings-siva-default-manual-access-title"
case settingsSivaDefaultCertificateTitle = "settings-siva-default-certificate-title"
Expand Down Expand Up @@ -496,6 +495,7 @@ enum LocKey : String
case voiceControlRoleCountry = "voice-control-role-country";
case voiceControlRoleZip = "voice-control-role-zip";
case voiceControlRoleAndAddress = "voice-control-role-and-address";
case voiceControlSivaCategory = "voice-control-siva-category";
case voiceControlSivaService = "voice-control-siva-service";
case voiceControlSivaDefaultAccess = "voice-control-siva-default-access";
case voiceControlSivaManualAccess = "voice-control-siva-manual-access";
Expand Down
5 changes: 2 additions & 3 deletions MoppApp/MoppApp/ManualProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ public class ManualProxy {
host: DefaultsHelper.proxyHost ?? "",
port: DefaultsHelper.proxyPort,
username: DefaultsHelper.proxyUsername ?? "",
password: KeychainUtil.retrieve(key: proxyPasswordKey) ?? "",
isSSLEnabled: DefaultsHelper.isProxyForSSLEnabled)
password: KeychainUtil.retrieve(key: proxyPasswordKey) ?? "")
}

public static func getMoppLibProxyConfiguration() -> MoppLibProxyConfiguration {
let manualProxy = ManualProxy.getManualProxyConfiguration()
return MoppLibProxyConfiguration(configuration: manualProxy.host, port: NSNumber(value: manualProxy.port), username: manualProxy.username, password: manualProxy.password, issslenabled: manualProxy.isSSLEnabled)
return MoppLibProxyConfiguration(configuration: manualProxy.host, port: NSNumber(value: manualProxy.port), username: manualProxy.username, password: manualProxy.password)
}
}
Loading

0 comments on commit e38bbf4

Please sign in to comment.