File tree 5 files changed +24
-9
lines changed
5 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 1
- API_HOST_NAME[config=Debug] = api.mullvad.net
2
- API_HOST_NAME[config=Release] = api.mullvad.net
3
- API_HOST_NAME[config=MockRelease] = api.mullvad.net
4
- API_HOST_NAME[config=Staging] = api.stagemole.eu
1
+ HOST_NAME[config=Debug] = mullvad.net
2
+ HOST_NAME[config=Release] = mullvad.net
3
+ HOST_NAME[config=MockRelease] = mullvad.net
4
+ HOST_NAME[config=Staging] = stagemole.eu
5
+
6
+ API_HOST_NAME[config=Debug] = api.$(HOST_NAME)
7
+ API_HOST_NAME[config=Release] = api.$(HOST_NAME)
8
+ API_HOST_NAME[config=MockRelease] = api.$(HOST_NAME)
9
+ API_HOST_NAME[config=Staging] = api.$(HOST_NAME)
5
10
6
11
API_ENDPOINT[config=Debug] = 45.83.223.196:443
7
12
API_ENDPOINT[config=Release] = 45.83.223.196:443
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ final class OutgoingConnectionProxy: OutgoingConnectionHandling {
21
21
case v4 = " ipv4 " , v6 = " ipv6 "
22
22
23
23
var host : String {
24
- " \( rawValue) .am.i.mullvad.net "
24
+ " \( rawValue) .am.i. \( ApplicationConfiguration . hostName ) "
25
25
}
26
26
}
27
27
Original file line number Diff line number Diff line change 2
2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
<plist version =" 1.0" >
4
4
<dict >
5
+ <key >HostName </key >
6
+ <string >$(HOST_NAME) </string >
5
7
<key >NSLocalNetworkUsageDescription </key >
6
8
<string >The app needs this to connect and test a new method. </string >
7
9
<key >ApplicationSecurityGroupIdentifier </key >
Original file line number Diff line number Diff line change 2
2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
<plist version =" 1.0" >
4
4
<dict >
5
+ <key >HostName </key >
6
+ <string >$(HOST_NAME) </string >
5
7
<key >ApplicationSecurityGroupIdentifier </key >
6
8
<string >$(SECURITY_GROUP_IDENTIFIER) </string >
7
9
<key >MainApplicationIdentifier </key >
Original file line number Diff line number Diff line change 9
9
import Foundation
10
10
import Network
11
11
12
+ // swiftlint:disable force_cast
12
13
enum ApplicationConfiguration {
14
+ static var hostName : String {
15
+ Bundle . main. object ( forInfoDictionaryKey: " HostName " ) as! String
16
+ }
17
+
13
18
/// Shared container security group identifier.
14
19
static var securityGroupIdentifier : String {
15
- // swiftlint:disable:next force_cast
16
20
Bundle . main. object ( forInfoDictionaryKey: " ApplicationSecurityGroupIdentifier " ) as! String
17
21
}
18
22
@@ -59,14 +63,16 @@ enum ApplicationConfiguration {
59
63
static let logMaximumFileSize : UInt64 = 131_072 // 128 kB.
60
64
61
65
/// Privacy policy URL.
62
- static let privacyPolicyURL = URL ( string: " https://mullvad.net /help/privacy-policy/ " ) !
66
+ static let privacyPolicyURL = URL ( string: " https:// \( Self . hostName ) /help/privacy-policy/ " ) !
63
67
64
68
/// Make a start regarding policy URL.
65
- static let privacyGuidesURL = URL ( string: " https://mullvad.net /help/first-steps-towards-online-privacy/ " ) !
69
+ static let privacyGuidesURL = URL ( string: " https:// \( Self . hostName ) /help/first-steps-towards-online-privacy/ " ) !
66
70
67
71
/// FAQ & Guides URL.
68
- static let faqAndGuidesURL = URL ( string: " https://mullvad.net /help/tag/mullvad-app/ " ) !
72
+ static let faqAndGuidesURL = URL ( string: " https:// \( Self . hostName ) /help/tag/mullvad-app/ " ) !
69
73
70
74
/// Maximum number of devices per account.
71
75
static let maxAllowedDevices = 5
72
76
}
77
+
78
+ // swiftlint:enable force_cast
You can’t perform that action at this time.
0 commit comments