Commit Graph

36 Commits

Author SHA1 Message Date
Davide De Rosa 4afbe4aa4e Fix condition for external hostname in endpoints 2019-04-26 15:29:50 +02:00
Davide De Rosa 027bf82208 Store category groups as a list
Map complexity is of no use.

Update JSON (stub).
2019-04-26 13:48:26 +02:00
Davide De Rosa b61906c32f Handle Pool.resolved to use external hostname 2019-04-26 10:15:24 +02:00
Davide De Rosa bd29b6d6f0 Split external configuration read and injection
For reuse in Pool.addresses
2019-04-25 22:25:54 +02:00
Davide De Rosa d9a0ebd923 Upgrade API to v2 (entities) 2019-04-25 21:30:43 +02:00
Davide De Rosa ddb0c38860 Add comments about the need of cache LRU 2019-04-11 23:38:16 +02:00
Davide De Rosa cf8f0984a3 Cache pool models, do not rebuild each time
Invalidate on new infrastructure.
2019-04-11 23:38:16 +02:00
Davide De Rosa 8a81ad8f72 Update NordVPN infrastructure
- Pick default pool by country e.g. "us" rather than "us-123"
- Drop overwhelming resolved addresses

Required changes:

- Assume default pool id to be a prefix
- Make Pool addresses optional
2019-04-11 21:14:56 +02:00
Davide De Rosa 2f09a41d06 Stop to download additional provider resources 2019-04-11 19:01:55 +02:00
Davide De Rosa 922a715bfd Inject external resources into configuration 2019-04-11 18:05:53 +02:00
Davide De Rosa 12597d34b3 Override hostname with profile value
Now that TunnelKit uses sessionConfiguration.hostname to set
.serverAddress, it must be set no matter what.

If hostname is nil, serverAddress is set to
resolvedAddresses.first, which for host profiles is always nil.

Also reorder provider code.
2019-04-10 15:13:31 +02:00
Davide De Rosa 89d7c6924d Make hostname optional in provider pool
E.g. ProtonVPN SecureCore servers don't provide a hostname.
2019-04-09 20:47:08 +02:00
Davide De Rosa f53ad65bcd Default "Any" protocol to UDP endpoints
Mitigates a potential issue with randomizeEndpoint where TCP
endpoints might be picked with equal probability, resulting in
poor performance out of the box.

Let the user pick TCP endpoints manually.
2019-04-07 15:15:14 +02:00
Davide De Rosa 8d3a5d747d Convert table model to PoolGroup 2019-04-06 16:20:01 +02:00
Davide De Rosa 1904687a22 Upgrade to TunnelKit 1.6.0
- Make cipher/digest/compressionFraming optional
- Move endpointProtocols inside SessionProxy.Configuration
- Rename OptionsError to ConfigurationError
2019-04-04 19:03:53 +02:00
Davide De Rosa 96f5210c7c Control debug masking via diagnostics
Be clear about NOT logging any sensitive data. In fact, the
variable name masksPrivateData is potentially misleading.
2019-03-22 18:54:54 +01:00
Davide De Rosa f661008679 Make framework internal components public 2019-03-18 11:50:52 +01:00
Davide De Rosa 7a21338042 Update copyright 2019-03-09 11:44:44 +01:00
Davide De Rosa 2e4d2162ac Define custom intents
- Connect
- Disable
- (Un)Trust current network
- (Un)Trust cellular network
- Move to location
2019-03-09 11:23:47 +01:00
Davide De Rosa ce3781e3b5 Be more formal about ProfileKey parsing 2019-03-08 10:21:08 +01:00
Davide De Rosa b50cb4681b Fix stupid parsing of ProfileKey from String
Fixes #19
2019-03-08 00:01:52 +01:00
Davide De Rosa d0de93c60a Do not sort endpoint addresses
Defeats purpose of best-first ordering in DNS reply.
2019-01-17 09:51:42 +01:00
Davide De Rosa 3d5c2bb8f5 Move .ovpn parser to TunnelKit 2018-11-10 11:39:36 +01:00
Davide De Rosa c7cb00f679 Move ProfileKey to separate file 2018-11-06 11:16:34 +01:00
Davide De Rosa 389746180b Move PlaceholderConnectionProfile to separate file 2018-11-06 11:16:30 +01:00
Davide De Rosa 9e7c4960e5 Update GitHub URL in license preamble 2018-11-04 10:53:16 +01:00
Davide De Rosa aa2b6bafaf Add method to rename immutable profile 2018-11-02 15:52:34 +01:00
Davide De Rosa cced9b018f Fix provider name ordering
Define intrinsecally with Comparable.
2018-10-29 17:48:17 +01: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 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 9726158030 Drop deprecated configuration values
- debugLogKey
- lastErrorKey
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 e8f2aaaf08 Show tunnel failure reason in VPN status 2018-10-22 21:49:43 +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 b9ec01945d Initial commit 2018-10-11 09:13:19 +02:00