Skip to content

Commit

Permalink
Merge pull request #368 from ivpn/task/ip-address-host-ios17
Browse files Browse the repository at this point in the history
Support for IP address as host in iOS 17
  • Loading branch information
jurajhilje authored Oct 23, 2023
2 parents 2e4a1cc + 9d3724b commit 6700fd7
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
62 changes: 62 additions & 0 deletions IVPNClient/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,67 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>198.50.177.220</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>149.56.162.156</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>198.50.177.222</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>149.56.162.159</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>198.50.177.223</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>2607:5300:203:1735::8888</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>2607:5300:203:1735::8</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
<key>2607:5300:203:1735:6580:7300:0:aaaa</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
</dict>
</dict>
</dict>
</plist>
10 changes: 9 additions & 1 deletion IVPNClient/Managers/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ class APIClient: NSObject {
private var hostName = UserDefaults.shared.apiHostName

private var baseURL: URL {
return URL(string: "https://\(hostName)")!
if let url = URL(string: "https://\(hostName)") {
return url
}

if let url = URL(string: "https://[\(hostName)]") {
return url
}

return URL(string: "https://\(Config.ApiHostName)")!
}

private var userAgent: String {
Expand Down

0 comments on commit 6700fd7

Please sign in to comment.