Commit Graph

632 Commits

Author SHA1 Message Date
Roopesh Chander 3136fe0e2c NE: When there's an error starting the tunnel, show it to the user using displayMessage()
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-09 17:07:42 +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 5ee4d392b5 Move logic to extension: Bring up the tunnel from the stored providerConfiguration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 18:59:16 +05:30
Roopesh Chander c17e4a27a2 DNSResolver: Simplify
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 17:52:11 +05:30
Roopesh Chander 8409b7e929 DNSResolver: Let's not cache DNS resolution results anymore
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 17:52:11 +05:30
Roopesh Chander 651ffa0c51 DNSResolver: DNS resolution can now happen synchronously
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 17:52:11 +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 af58bfcb00 Move logic to extension: Refactor PacketTunnelOptionsGenerator into a PacketTunnelSettingsGenerator
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 15:44:13 +05:30
Roopesh Chander 2f7e437202 Move logic to extension: Move DNSResolver to extension
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 15:09:45 +05:30
Roopesh Chander 62573e2ad7 Move logic to extension: .resolvingEndpointDomains is not longer a valid status
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 15:08:57 +05:30
Roopesh Chander a5f9dc4821 Move logic to extension: DNS resolution no longer happens in the app
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 15:04:12 +05:30
Roopesh Chander 7827147bc8 Move logic to extension: Include shared model code when building the extension
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 14:50:05 +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 fb6a7f6007 Move logic to extension: Move PacketTunnelOptionsGenerator to the extension
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 14:16:30 +05:30
Roopesh Chander f7b04b0b5d Move logic to extension: Invoke startTunnel() without any options
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 14:15:01 +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
Roopesh Chander ec2d67ea00 Tunnel edit: While preparing for reuse, should make onValueBeingEdited nil as well
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-08 12:25:36 +05:30
Jason A. Donenfeld 9840e94c84 Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-07 17:43:50 +01:00
Roopesh Chander 85a19da487 iPad: Ensure we set sourceRect for all cases where we use sourceView
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 17:43:30 +01:00
Roopesh Chander b5447add1e Info.plist: Register for handling public.text files for Open-in
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 17:43:30 +01:00
Roopesh Chander 879e9816aa Importing: Also support importing public.text files in the file picker
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 17:43:30 +01:00
Roopesh Chander 3269bb476a iPad: Set correct sourceRect for the popover anchored on the central 'Add' button
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 18:23:12 +05:30
Roopesh Chander b3515c937e TunnelsManager: Return a manager with no tunnels in the simulator
To be able to run at least parts of the app in the simulator.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 18:15:20 +05:30
Roopesh Chander 7e9ee913c1 iPad: Configuring the split-view controller should happen in init(), not loadView()
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 15:54:30 +05:30
Jason A. Donenfeld d0ec532bd3 Settings: show build id
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-07 05:45:39 +01:00
Jason A. Donenfeld ff6a293660 Make license consistent
We changed all the files and the README to MIT a long time ago but
forgot to update COPYING.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-07 01:26:32 +01:00
Jason A. Donenfeld c5c536318f Version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-06 20:18:11 +01:00
Jason A. Donenfeld 6e36c72f96 Importing: simplify
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-06 20:16:40 +01:00
Roopesh Chander f9dcfc1b9d Importing: Assume imported files without .conf or .zip extensions to be a config file
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-07 00:35:37 +05:30
Roopesh Chander 33edfd3587 DNSResolver: No need to resolve if the endpoint is already an IP address
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 23:59:48 +05:30
Roopesh Chander aa0b6e0c60 Model: Endpoint.hasHostAsIPAddress()
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 23:59:48 +05:30
Jason A. Donenfeld e992030569 PacketTunnelProvider: modernize header
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-06 19:04:53 +01:00
Jason A. Donenfeld 18a21064b2 Not horribly broken
Instead it's just mostly broken. Maybe someday it will only be partially
broken. Then a bit broken. And then maybe not broken at all? Before, of
course, it's broken again.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-06 19:02:46 +01:00
Roopesh Chander f6a5dfead4 Global: swiftlint autocorrect --format
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 22:42:53 +05:30
Roopesh Chander 0f4b1c5c1c Global: swiftlint autocorrect
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 22:42:05 +05:30
Roopesh Chander 3496adca86 Importing: Error out on file with unsupported file extension
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 22:32:33 +05:30
Jason A. Donenfeld 0a55a284d5 wireguard-go-bridge: take fd instead of fnptr
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-06 16:27:25 +01:00
Jason A. Donenfeld 02c31c89f6 Xcode: enable more warnings
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-06 16:27:25 +01:00
Roopesh Chander 95a4419b20 Tunnel edit: TunnelEditTableViewKeyValueCell need not support a read-only mode now
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 19:01:13 +05:30
Roopesh Chander 6c9fc8bcb1 Tunnel edit: A new cell class for the public key field, to make the value scrollable
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 17:05:03 +05:30
Roopesh Chander 1a43ad6e39 Tunnel detail: Refactor out the label scrolling into a separate UI class
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 16:49:09 +05:30
Roopesh Chander a62f7fb988 Tunnel view model: Peers in a configuation may not share the same public key
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 08:17:56 +05:30
Roopesh Chander 636aa98b79 Parser: Peers in a configuation may not share the same public key
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-06 08:17:56 +05:30
Jason A. Donenfeld 24575a5cf9 Version bump
We update the build number, not the version number, so that test flight
doesn't need a new review.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-05 21:44:00 +01:00
Roopesh Chander 34a8d70a45 Parser: Address, DNS and AllowedIPs can have mutliple entries
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-05 23:53:00 +05:30
Roopesh Chander 733c29021e QR Code: Dismiss the QR code screen when the name prompt is cancelled
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-05 23:38:41 +05:30
Roopesh Chander f102051e22 Tunnel view model: No need to save if we already have a validated configuration object
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-05 22:55:09 +05:30
Jason A. Donenfeld e228ac9d99 global: convert to Swift 4.2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-05 06:31:25 +01:00
Jason A. Donenfeld 8860abc89e TunnelsManager: account for no or many endpoints
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-05 06:23:26 +01:00