Commit Graph

14 Commits

Author SHA1 Message Date
Roopesh Chander f6faffa4c1 Refactoring: Consolidate file deletion into a separate function
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-07 12:36:19 +05:30
Roopesh Chander 679d63294d NE: Write log to file
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-30 00:36:33 +05:30
Roopesh Chander cc122d7463 Model, Tunnels manager: Rewrite the model for VPN-on-demand
The VPN-on-demand settings should not be part of the tunnel
configuration. Rather, the onDemandRules stored in the
tunnel provider configuration serve as the one place
where the VPN-on-demand settings are stored.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-12 19:24:13 +05:30
Roopesh Chander 4b7094d652 Model: Add activationType to tunnel configuration
We make sure existing tunnel serializations can be deserialized correctly.

We also bump up the tunnelConfigurationVersion, because the tunnel
configuration contents have changed.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-11 01:17:36 +05:30
Roopesh Chander 0f03ffc920 Model: ActivityType enum to represent VPN-on-demand options
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-10 19:17:24 +05:30
Roopesh Chander 1502bd42d3 Model: TunnelConfiguration: Add explicit conformance to Decodable
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-10 19:01:34 +05:30
Roopesh Chander 290f83d5ef Model: Ensure that a TunnelConfiguration always has a valid array of peers
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-10 17:02:30 +05:30
Roopesh Chander a1070d2b29 Remove unused file PacketTunnelOptionKey.swift
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 18:59:16 +05:30
Roopesh Chander 4404bb2b7d Model: Endpoint.hostname()
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 17:52:11 +05:30
Roopesh Chander e66cf5264a Move logic to extension: NETunnelProviderProtocol extension code should be shared
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 17:52:01 +05:30
Roopesh Chander a473dfe4f8 Model: Move InterfaceConfiguration.publicKey to Curve25519.swift
The code for public key calculation need not be shared with the extension

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 14:48:25 +05:30
Roopesh Chander c88c660b51 Move logic to extension: Move model files to Shared
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 13:56:50 +05:30
Jason A. Donenfeld 5b6ef1ca38 Global: fix up captialization in headers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-30 03:57:35 +01:00
Roopesh Chander 793bf63989 VPN: Bring up the tunnel
The app figures out all settings and passes them in the
'options' parameter of startTunnel().

The network extension just takes them as is and just plugs the supplied
values into the right places.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:16 +05:30