diff options
| author | Bug Magnet <marco.nikic@mullvad.net> | 2023-05-04 09:56:21 +0200 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2023-05-12 14:51:59 +0200 |
| commit | a08ceebb971669bcd35992f744f98a4e0f5ecc05 (patch) | |
| tree | 8bd5ca47f322fe90537ef42f3bdd2e71f73b67a4 /ios/MullvadVPN | |
| parent | bdd6590031354943f392326a1d951f26d42240b7 (diff) | |
| download | mullvadvpn-a08ceebb971669bcd35992f744f98a4e0f5ecc05.tar.xz mullvadvpn-a08ceebb971669bcd35992f744f98a4e0f5ecc05.zip | |
Simplify the AddressCache logic, it now filters results to only keep the first one, does not rotate addresses anymore, and has tests written for.
Diffstat (limited to 'ios/MullvadVPN')
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index 748742ee76..26ac51cccf 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -51,10 +51,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD logger = Logger(label: "AppDelegate") + let containerURL = FileManager.default + .containerURL(forSecurityApplicationGroupIdentifier: ApplicationConfiguration.securityGroupIdentifier)! + addressCache = REST.AddressCache( - securityGroupIdentifier: ApplicationConfiguration.securityGroupIdentifier, - isReadOnly: false - )! + canWriteToCache: true, cacheFolder: containerURL + ) proxyFactory = REST.ProxyFactory.makeProxyFactory( transportProvider: { [weak self] in |
