Commit Graph

601 Commits

Author SHA1 Message Date
Jason A. Donenfeld 6405b76941 TunnelsManager: do not track currentTunnel
It's error prone and does not give us anything.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 06:22:57 +01:00
Jason A. Donenfeld 9e9898f17d TunnelsManager: do not change back to inactive if we are resolving the endpoint
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 06:09:57 +01:00
Roopesh Chander ae2ae87bbe Tunnels list: Remove separator lines in the table view
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-03 10:26:15 +05:30
Roopesh Chander 735d542658 Tunnels list: Show an 'Add' button when there are no tunnels
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-03 10:26:09 +05:30
Roopesh Chander 0c60489819 Tunnels list: Show a busy indicator before the tunnels are loaded
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-03 10:25:47 +05:30
Roopesh Chander 9df0064eac Tunnels list: The Add and Settings buttons should be no-ops until the tunnels are loaded
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-03 10:25:47 +05:30
Roopesh Chander f6a29d9f50 Tunnel edit: Use layoutMarginsGuide instead of constants
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-03 10:25:47 +05:30
Jason A. Donenfeld 5845db4568 TunnelsManager: fix use of arrayslice in addMultiple
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 04:37:56 +01:00
Jason A. Donenfeld f57c40c38b TunnelsManager: get rid of name set
Instead, tunnels itself should be a sorted-set. For now it's a list,
which is probably fine though.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 03:53:08 +01:00
Jason A. Donenfeld 007d6d9c58 TunnelsManager: get rid of index management
No need for premature optimization. There aren't that many tunnels most
of the time, and calling sort on a partially sorted array is fast.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 03:43:09 +01:00
Jason A. Donenfeld 9439e00047 Global: no periods at the end of error messages
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 03:43:09 +01:00
Jason A. Donenfeld 95101dce5c Import: rework addMultiple logic
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-03 03:43:09 +01:00
Roopesh Chander dff928fafa Tunnel detail: In the key-value cell, make the value label scrollable horizontally
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 23:48:27 +05:30
Roopesh Chander 4c485cdbb2 Tunnel edit: Ensure all key-value fields have a placeholder text
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 18:20:32 +05:30
Roopesh Chander f92fb1b9f4 DNSResolver: Bugfix: Always call completion handler
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 18:10:51 +05:30
Roopesh Chander 29004c0ab6 Info.plist: Update document icons and description
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 17:40:46 +05:30
Roopesh Chander 159ecca829 Info.plist: Document type UTI should be consistent with exported UTI
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 17:40:46 +05:30
Roopesh Chander cd16db83cc Info.plist: Register zip file for open-in
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 17:40:46 +05:30
Roopesh Chander 09a0d1ef20 Info.plist: Add .conf extension to document type
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 17:40:46 +05:30
Roopesh Chander 1e5bd7e458 Add document icon
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 17:39:43 +05:30
Roopesh Chander f7be9a29a9 Add app icons
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 16:11:24 +05:30
Roopesh Chander 969e0bda10 Remove files we don't need
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 15:39:10 +05:30
Roopesh Chander 90af773fef Handle cell reuse in showing delete buttons in red
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 13:24:10 +05:30
Roopesh Chander e7a1f142fb Table edit: Show/hide 'Exclude Private IPs' instead of enable/disable
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 13:12:10 +05:30
Roopesh Chander 66e802584b Tunnel view model: If there's just one peer, populate the scratchpad on init
So that exclude private IPs can be computed correctly.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 13:09:45 +05:30
Roopesh Chander b3cc30a207 Tunnel view model: Initialize peerData.numberOfPeers
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-02 12:05:58 +05:30
Jason A. Donenfeld 7fc0e3ee94 DNSResolver: getaddrinfo returns a sockaddr and inet_ntop takes strlen
The way this was written before was totally wrong.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-02 05:34:17 +01:00
Jason A. Donenfeld 6676e557f1 wireguard-go-bridge: use boottime instead of monotonic
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-01 23:39:06 +01:00
Jason A. Donenfeld b21de2e398 NetworkExtension: check isTunnelClosed before packet existence
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-01 22:01:52 +01:00
Jason A. Donenfeld cf569fd0d2 Global: OK over Ok
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-01 21:22:12 +01:00
Roopesh Chander abd02975c5 Deletion buttons are shown in red
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 23:53:09 +05:30
Roopesh Chander 46e9eddecc Tunnel edit: Highlight erroring field keys in red
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 23:45:48 +05:30
Roopesh Chander 55cf6e6181 Tunnels list: Swipe left to delete
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 23:45:48 +05:30
Jason A. Donenfeld c2d76b9c45 Global: fix up strings
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-01 19:01:43 +01:00
Roopesh Chander 196daccdde QR code: Fix what happens when an error is shown
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 22:08:01 +05:30
Roopesh Chander 7608cebbc6 NE: Show an alert when someone tries to start the VPN from iOS Settings
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 22:08:01 +05:30
Jason A. Donenfeld c5e35fee1e Export: fix up export format
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-11-01 17:31:50 +01:00
Roopesh Chander 3611f8cf5a Tunnel errors: Consolidate tunnel activation errors into ErrorPresenter
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 16:58:33 +05:30
Roopesh Chander 39a457e402 TunnelsManager: Better errors
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 16:57:40 +05:30
Roopesh Chander 53a93e9b92 ConfigFile: WgQuickConfigFileWriter: Fix '[Peer]' section header
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 16:13:30 +05:30
Roopesh Chander 1377153bc6 Importing: Account for errors in showing the 'No configurations found' error
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 15:59:17 +05:30
Roopesh Chander 5138cdf9ea Tunnel detail: Fix deletion of tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 15:54:37 +05:30
Roopesh Chander 040ce32015 VPN: TunnelsManager: Fix deletion code
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 15:53:10 +05:30
Roopesh Chander 2870175ab2 VPN: Restart tunnel after modifying a currently active configuration
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 15:36:59 +05:30
Roopesh Chander b96e5ae563 QR code: Degrade gracefully when running on the simulator or on a device without a camera
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 11:45:44 +05:30
Roopesh Chander 95ad752d65 Revert "QR code: QR code scanning is not available in the simulator"
This reverts commit 9729386406.

Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 11:45:44 +05:30
Roopesh Chander 193b8c2596 Importing: Show error when the zip file contains no .conf files
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 11:45:44 +05:30
Roopesh Chander cf7966e876 VPN: We have to start observing the tunnelContainer before we attempt to activate it
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 11:45:44 +05:30
Roopesh Chander 066449b207 Importing: Error out on duplicate name
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 11:45:44 +05:30
Roopesh Chander bede8a17ad QR Code: Error out on duplicate name
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-01 11:45:44 +05:30