Commit Graph

33 Commits

Author SHA1 Message Date
Davide De Rosa 326c5b823d Observe wizard creation via notifications
Flow is too scattered to safely maintain delegation.
2018-10-27 20:11:26 +02:00
Davide De Rosa cda53bc4f1 Clean up Inbox on migration 2018-10-27 13:35:21 +02:00
Davide De Rosa dcecc84bda Remove .ovpn of deleted profile 2018-10-27 13:35:21 +02:00
Davide De Rosa 0e7c0b6388 List imported .ovpn if any, fall back to alert
Use .formSheet presentation (iPad).
2018-10-27 12:43:26 +02:00
Davide De Rosa 4bcb1fe2ad Convert some warnings to errors 2018-10-27 12:08:44 +02:00
Davide De Rosa 804585f13d Fix/improve some poor filename parsing 2018-10-27 10:52:26 +02:00
Davide De Rosa 821393af70 Refactor configurations in service extension
Reuse same directories of ConnectionService for storing
configuration files.
2018-10-27 09:42:41 +02:00
Davide De Rosa 76f2597424 Update TunnelKit and remove unused code
ConnectionProfileHolder
2018-10-26 19:05:25 +02:00
Davide De Rosa b5347e04b2 Move Context to ConnectionProfile
Fix an id conflict in credentials.
2018-10-26 18:57:07 +02:00
Davide De Rosa 18c7de140e Overwrite an existing profile configuration 2018-10-26 18:57:07 +02:00
Davide De Rosa 78abb8c764 Refactor service to use external profile JSONs
- Store only profile key/metadata into service.

- Map profiles by (context, id), context being either provider
or host.

- Initialize cache with a placeholder profile, lazily load full
profile (e.g. after opening profile).

- Only serialize non-placeholder profiles (opened once).

- Do not load full profiles for organizer listing

WARNING: always load active profile as non-placeholder.
2018-10-26 18:30:37 +02:00
Davide De Rosa 2d2884fdea Export profiles to separate JSONs
Use id as contextual filename.
2018-10-26 18:03:28 +02:00
Davide De Rosa 2aae3499de Move host configurations to "Hosts" subdirectory
Without "host." prefix, now unnecessary.
2018-10-26 18:03:28 +02:00
Davide De Rosa 8e1b67d151 Infer profile id uniqueness by context
Drop "(provider|host)." prefix, reuse as title.
2018-10-26 17:37:52 +02:00
Davide De Rosa 8f29f79168 Fix exceptions thrown on already migrated JSON
Also remove deprecated tunnel configuration keys.
2018-10-26 15:31:02 +02:00
Davide De Rosa 9726158030 Drop deprecated configuration values
- debugLogKey
- lastErrorKey
2018-10-25 22:45:50 +02:00
Davide De Rosa 12e0a55f7a Bind migrations to build numbers 2018-10-25 22:45:50 +02:00
Davide De Rosa 082ffa3cb1 Attach build number to service JSON
Update before serializing.
2018-10-25 22:45:50 +02:00
Davide De Rosa c73c2e3826 Rename tunnelConfiguration to baseConfiguration
It's much less confusing. Migrate too.
2018-10-25 22:45:50 +02:00
Davide De Rosa 09685e6994 Activate service migration 2018-10-25 22:45:50 +02:00
Davide De Rosa d087acd512 Migrate host configurations 2018-10-25 22:45:50 +02:00
Davide De Rosa 542a3e3721 Upgrade TunnelKit with configuration refactoring 2018-10-25 22:45:44 +02:00
Davide De Rosa ef9032e440 Update TunnelKit
- Improve logging performance and privacy.
- Fix server-side renegotiation issues.
2018-10-24 21:23:13 +02:00
Davide De Rosa be17f57a5e Add reset cell to revert to original configuration
When a backing .ovpn is available.
2018-10-23 12:57:11 +02:00
Davide De Rosa 346a9490ec Save .ovpn internally associated to host profile 2018-10-23 12:57:11 +02:00
Davide De Rosa 976e47af64 Clear VPN error status before restart 2018-10-22 21:49:43 +02:00
Davide De Rosa e8f2aaaf08 Show tunnel failure reason in VPN status 2018-10-22 21:49:43 +02:00
Davide De Rosa 8219519a22 Fix credentials requirement in VPN configuration
Refines #4
2018-10-19 17:51:25 +02:00
Davide De Rosa ae2bd3d876 Replace some profile exceptions with preconditions
Misconfigured profiles must fall back to a consistent state, this
is a programming error.

- provider.pool: fall back to default pool (should always be there)
- provider.preset: why would one remove a preset?
- host.endpointProtocols: .ovpn with no remotes shouldn't get this far
2018-10-19 01:29:44 +02:00
Davide De Rosa 5e0590184b Require credentials for providers only
Not always the case, but PIA certainly requires them. Will make it
an infrastructure option later. Only require credentials as a
configuration check, everything else has defaults.
2018-10-19 01:29:44 +02:00
Davide De Rosa 567ddd9b12 Find out version/build statically
Assume bundle and info dictionary are never nil.
2018-10-18 14:02:35 +02:00
Davide De Rosa 62d1c2d882 Add promoting alert for subreddit 2018-10-18 10:04:23 +02:00
Davide De Rosa b9ec01945d Initial commit 2018-10-11 09:13:19 +02:00