Add ProtonVPN provider

This commit is contained in:
Davide De Rosa 2019-03-24 23:08:38 +01:00
parent f067ade6f9
commit 36ee076c9c
10 changed files with 38 additions and 2 deletions

View File

@ -283,6 +283,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 pia = ImageAsset(name: "pia") internal static let pia = ImageAsset(name: "pia")
internal static let protonvpn = ImageAsset(name: "protonvpn")
internal static let tunnelbear = ImageAsset(name: "tunnelbear") internal static let tunnelbear = ImageAsset(name: "tunnelbear")
internal static let windscribe = ImageAsset(name: "windscribe") internal static let windscribe = ImageAsset(name: "windscribe")
} }

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -68,6 +68,9 @@ class AccountViewController: UIViewController, TableModelHost {
case .pia: case .pia:
return V.pia(name.rawValue) return V.pia(name.rawValue)
case .protonVpn:
return V.protonvpn(name.rawValue)
case .tunnelBear: case .tunnelBear:
return V.tunnelbear(name.rawValue) return V.tunnelbear(name.rawValue)

View File

@ -130,8 +130,9 @@
"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.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 Login\" 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.";
"account.sections.guidance.footer.infrastructure.windscribe" = "Find your credentials in the OpenVPN Config Generator on the %@ website."; "account.sections.guidance.footer.infrastructure.windscribe" = "Find your %@ credentials in the OpenVPN Config Generator on the website.";
"account.sections.registration.footer" = "Go get an account on the %@ website."; "account.sections.registration.footer" = "Go get an account on the %@ website.";
"account.cells.username.caption" = "Username"; "account.cells.username.caption" = "Username";
"account.cells.username.placeholder" = "username"; "account.cells.username.placeholder" = "username";

View File

@ -165,12 +165,14 @@ public class AppConstants {
} }
public static let guidances: [Infrastructure.Name: String] = [ public static let guidances: [Infrastructure.Name: String] = [
.protonVpn: "https://account.protonvpn.com/settings",
.windscribe: "https://windscribe.com/getconfig/openvpn" .windscribe: "https://windscribe.com/getconfig/openvpn"
] ]
public static let referrals: [Infrastructure.Name: String] = [ public static let referrals: [Infrastructure.Name: String] = [
.mullvad: "https://mullvad.net/en/account/create/", .mullvad: "https://mullvad.net/en/account/create/",
.pia: "https://www.privateinternetaccess.com/pages/buy-vpn/", .pia: "https://www.privateinternetaccess.com/pages/buy-vpn/",
.protonVpn: "https://protonvpn.net/?aid=keeshux",
.tunnelBear: "https://click.tunnelbear.com/aff_c?offer_id=2&aff_id=7464", .tunnelBear: "https://click.tunnelbear.com/aff_c?offer_id=2&aff_id=7464",
.windscribe: "https://secure.link/kCsD0prd" .windscribe: "https://secure.link/kCsD0prd"
] ]

View File

@ -32,6 +32,8 @@ public struct Infrastructure: Codable {
case pia = "PIA" case pia = "PIA"
case protonVpn = "ProtonVPN"
case tunnelBear = "TunnelBear" case tunnelBear = "TunnelBear"
case windscribe = "Windscribe" case windscribe = "Windscribe"

View File

@ -59,6 +59,7 @@ public class InfrastructureFactory {
public let allNames: [Infrastructure.Name] = [ public let allNames: [Infrastructure.Name] = [
.mullvad, .mullvad,
.pia, .pia,
.protonVpn,
.tunnelBear, .tunnelBear,
.windscribe .windscribe
] ]

View File

@ -106,11 +106,15 @@ public enum L10n {
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)
} }
/// Find your %@ credentials in the "Account > OpenVPN Login" section of the website.
public static func protonvpn(_ p1: String) -> String {
return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.protonvpn", p1)
}
/// Use your %@ website credentials. Your username is usually your e-mail. /// Use your %@ website credentials. Your username is usually your e-mail.
public static func tunnelbear(_ p1: String) -> String { public static func tunnelbear(_ p1: String) -> String {
return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.tunnelbear", p1) return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.tunnelbear", p1)
} }
/// Find your credentials in the OpenVPN Config Generator on the %@ website. /// Find your %@ credentials in the OpenVPN Config Generator on the website.
public static func windscribe(_ p1: String) -> String { public static func windscribe(_ p1: String) -> String {
return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.windscribe", p1) return L10n.tr("Localizable", "account.sections.guidance.footer.infrastructure.windscribe", p1)
} }