Commit Graph

263 Commits

Author SHA1 Message Date
Roopesh Chander 3aed009eb6 Tunnel detail: Account for status section in peer index calculations
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:16 +05:30
Roopesh Chander 3f4d12c404 VPN: DNSResolver: A class that does DNS resolution using getaddrinfo
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:16 +05:30
Roopesh Chander 10c4085239 Tunnel detail: UI for activating and deactivating a tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:16 +05:30
Roopesh Chander a2daf09342 VPN: Activating, deactivating and tracking the status
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:16 +05:30
Roopesh Chander f5e5c7f17d Tunnel detail: Fix comment
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:16 +05:30
Roopesh Chander 0fcf48ce75 Model: Add a version number to the tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 19:07:01 +05:30
Roopesh Chander c8fba951ad VPN: Adding, modifying and deleting actual NETunnelProviderManager instances
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander ff7adb8bc8 Import: Support for importing a config file from file providers
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander f845d7557a iPad: Fix modal presentation style
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander 204cbc284a iPad: Make sure the navigation bar is visible in the detail view
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander f7feb18ea8 Tunnel editing: Delegate should also report when editing is cancelled
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander 05b9d6972b Import: Support for opening a .conf file in the app
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander 112b5c3b10 Tunnel editing: Separate init for creation and modification
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander a8dbeeda6d Parser: Interface name can be added after parsing
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander 1187657497 Model: Allow creating an interface with empty name
But don't allow such a tunnel to be added to the tunnel manager.

(We'll need to create an interface with an empty name when we're reading QR codes.)

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander 1c8928c8a1 Info.plist: support for opening wg-quick config (.conf) files
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander 6c33968fe3 Info.plist: Export the config file type declaration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:02 +05:30
Roopesh Chander e0c7006dbc Config file: Parsing a wg-quick config file
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 7316eb06f8 Model: MTU should be a 16-bit integer
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 6cddb9e34b VPN: Tunnel container shall provide direct access to the configuration object
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 06c84a22ca Tunnel editing: Modifying a tunnel configuration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 37f43759b8 Tunnel creation: After saving the new tunnel, show the detail view
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 0fad01107c Tunnel detail: Don't show fields that have empty value
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 5b1876b998 Tunnel creation: Public key is uneditable
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 3b77f824b6 Tunnel creation: An uneditable field's value should be grey as well
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 0ae4b3bcf1 Tunnel creation: Generate key pair
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 571e9b5826 Tunnel creation: Compute public key from private key as the text is being edited
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 8f4875caf0 Tunnel view model: Populate interface's public key
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander b6d41ec9de Model: Interface: Add a public key computed property
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander c689be7eff Crypto: Swift wrapper for the Curve25519 C code
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Jeroen Leenarts 5bfb6a2c13 Crypto: Curve25519: Add explicit cast to supress conversion warning.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-27 15:13:01 +05:30
Roopesh Chander acfa77f3df Crypto: Add Curve25519 C code to project
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Jeroen Leenarts 834c9ae7ce Crypto: Add key generation functions
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-27 15:13:01 +05:30
Roopesh Chander 7b915a8426 Tunnel creation: Hide 'Exclude private IPs' switch till the feature is ready
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 72ea54c0db Set Xcode template for smaller copyright headers
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 8ebfc6afcd Smaller copyright headers
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander c14d816b87 Tunnel detail: Start off with the tunnel detail view
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 88c7657eb7 Tunnel view model: Add copy public key
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander fa2760190b Tunnel creation: Variable renaming
s/interfaceEditFieldsBySection/interfaceFieldsBySection/g;
s/peerEditFieldsBySection/peerFieldsBySection/g;

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 6243717a37 Tunnel view model: The view model applies for both editing and viewing
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 20b49518da Tunnels list: Update when a tunnel is added
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 05efb453f3 Tunnel creation: Saving a configuration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 722b3f6c7b Model: Use DNSServer in the Configuration model
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander e1b8b67890 Model for DNS server
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander bcf8abb1de Model: Endpoint host should not have invalid characters
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander b2f2756d9c Model: listenPort and persistentKeepAlive should be 16-bit integers
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 607dd4bf3d Tunnel creation: Refactor by creating a separate view model
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander b4554dce9b Tunnel creation: Validate the data and prepare to save to a configuration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 28293c8029 Tunnel creation: Save typed values in a scratchpad
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30
Roopesh Chander 1a534faa0a Tunnel creation: Fix Persistent Keepalive label's look
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-10-27 15:13:01 +05:30