Add NordPVN provider

This commit is contained in:
Davide De Rosa 2019-04-09 22:35:00 +02:00
parent cbbf136d10
commit 2088795a9c
11 changed files with 39 additions and 1 deletions

View File

@ -282,6 +282,7 @@ internal enum Asset {
} }
internal enum Providers { internal enum Providers {
internal static let mullvad = ImageAsset(name: "mullvad") internal static let mullvad = ImageAsset(name: "mullvad")
internal static let nordvpn = ImageAsset(name: "nordvpn")
internal static let pia = ImageAsset(name: "pia") internal static let pia = ImageAsset(name: "pia")
internal static let protonvpn = ImageAsset(name: "protonvpn") internal static let protonvpn = ImageAsset(name: "protonvpn")
internal static let tunnelbear = ImageAsset(name: "tunnelbear") internal static let tunnelbear = ImageAsset(name: "tunnelbear")

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "nordvpn@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "nordvpn@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -65,6 +65,9 @@ class AccountViewController: UIViewController, TableModelHost {
case .mullvad: case .mullvad:
return V.mullvad(name.rawValue) return V.mullvad(name.rawValue)
case .nordVPN:
return V.nordvpn(name.rawValue)
case .pia: case .pia:
return V.pia(name.rawValue) return V.pia(name.rawValue)

File diff suppressed because one or more lines are too long

View File

@ -139,6 +139,7 @@
"account.sections.credentials.header" = "Credentials"; "account.sections.credentials.header" = "Credentials";
"account.sections.guidance.footer.infrastructure.mullvad" = "Use your %@ website account number and password \"m\"."; "account.sections.guidance.footer.infrastructure.mullvad" = "Use your %@ website account number and password \"m\".";
"account.sections.guidance.footer.infrastructure.nordvpn" = "Use your %@ website credentials. Your username is usually your e-mail.";
"account.sections.guidance.footer.infrastructure.pia" = "Use your %@ website credentials. Your username is usually numeric with a \"p\" prefix."; "account.sections.guidance.footer.infrastructure.pia" = "Use your %@ website credentials. Your username is usually numeric with a \"p\" prefix.";
"account.sections.guidance.footer.infrastructure.protonvpn" = "Find your %@ credentials in the \"Account > OpenVPN / IKEv2 Username\" section of the website."; "account.sections.guidance.footer.infrastructure.protonvpn" = "Find your %@ credentials in the \"Account > OpenVPN / IKEv2 Username\" section of the website.";
"account.sections.guidance.footer.infrastructure.tunnelbear" = "Use your %@ website credentials. Your username is usually your e-mail."; "account.sections.guidance.footer.infrastructure.tunnelbear" = "Use your %@ website credentials. Your username is usually your e-mail.";

View File

@ -203,7 +203,9 @@ public class AppConstants {
.windscribe: "https://secure.link/kCsD0prd" .windscribe: "https://secure.link/kCsD0prd"
] ]
public static let externalResources: [Infrastructure.Name: String] = [:] public static let externalResources: [Infrastructure.Name: String] = [
.nordVPN: "https://downloads.nordcdn.com/configs/archives/certificates/servers.zip" // 9MB
]
} }
public class Repos { public class Repos {

View File

@ -30,6 +30,8 @@ public struct Infrastructure: Codable {
public enum Name: String, Codable, Comparable { public enum Name: String, Codable, Comparable {
case mullvad = "Mullvad" case mullvad = "Mullvad"
case nordVPN = "NordVPN"
case pia = "PIA" case pia = "PIA"
case protonVPN = "ProtonVPN" case protonVPN = "ProtonVPN"

View File

@ -58,6 +58,7 @@ public class InfrastructureFactory {
// manually pre-sorted // manually pre-sorted
public let allNames: [Infrastructure.Name] = [ public let allNames: [Infrastructure.Name] = [
.mullvad, .mullvad,
.nordVPN,
.pia, .pia,
.protonVPN, .protonVPN,
.tunnelBear, .tunnelBear,

View File

@ -102,6 +102,10 @@ public enum L10n {
public static func mullvad(_ p1: String) -> String { public static func mullvad(_ p1: String) -> String {
return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.mullvad", p1) return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.mullvad", p1)
} }
/// Use your %@ website credentials. Your username is usually your e-mail.
public static func nordvpn(_ p1: String) -> String {
return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.nordvpn", p1)
}
/// Use your %@ website credentials. Your username is usually numeric with a "p" prefix. /// Use your %@ website credentials. Your username is usually numeric with a "p" prefix.
public static func pia(_ p1: String) -> String { public static func pia(_ p1: String) -> String {
return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.pia", p1) return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.pia", p1)