aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard (follow)
Commit message (Collapse)AuthorAgeFilesLines
* NetworkExtension: rescope socket instead of tearing down socketJason A. Donenfeld2018-12-262-21/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* minizip: Remove zip encryption codeRoopesh Chander2018-12-253-105/+0
| | | | | | We can now remove -DNOCRYPT cflag while compiling Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: Fix crashRoopesh Chander2018-12-241-1/+2
| | | | | | | | | | This fixes a crash that happens when you: 1. Scroll to the end of the Edit screen 2. Delete a peer 3. Toggle the Activate On Demand switch Signed-off-by: Roopesh Chander <roop@roopc.net>
* SwitchCell nitsEric Kuck2018-12-222-5/+5
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Fix typo for simulator buildsEric Kuck2018-12-221-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Remove more commentsRoopesh Chander2018-12-236-41/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Rely on availability of fd only after setting network settingsJason A. Donenfeld2018-12-221-29/+24
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Retain aggressive socket reestablishment for nowJason A. Donenfeld2018-12-221-1/+2
| | | | | | This can be reverted once we've done more testing. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Don't set username on NETunnelProviderProtocolRoopesh Chander2018-12-221-3/+0
| | | | | | | | The username corresponds to the Account field in iOS system VPN UI, but if we don't set it, the field is not shown, so setting it isn't really required. Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelErrors: Add alert text for PacketTunnelProviderErrorRoopesh Chander2018-12-222-13/+21
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelStatus: Absorb NEVPNStatus+CustomStringConvertibleRoopesh Chander2018-12-223-22/+13
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Also refresh statusJason A. Donenfeld2018-12-221-1/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Reassign tunnelProvider if it changes from outside the appJason A. Donenfeld2018-12-221-2/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* All models now EquatableEric Kuck2018-12-219-1/+99
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Clean up trailing whitespaceJason A. Donenfeld2018-12-224-12/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Do not crash if we can't get socket.fileDescriptorJason A. Donenfeld2018-12-221-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Removing a tunnel from iOS's settings is now immediately reflected in appEric Kuck2018-12-216-52/+72
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Localize remaining strings in network extensionJason A. Donenfeld2018-12-225-40/+42
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RTL supportEric Kuck2018-12-214-15/+15
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Strongly recommended now appears as placeholder for DNS when neededEric Kuck2018-12-211-19/+29
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Combine double log invocationsJason A. Donenfeld2018-12-222-7/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Attempt to strongly recommend thingsJason A. Donenfeld2018-12-223-6/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move model helpers to model directoryJason A. Donenfeld2018-12-225-6/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fixes mock tunnelsEric Kuck2018-12-211-3/+3
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Do not set copyable back to true on reuseJason A. Donenfeld2018-12-221-0/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move name from interface to tunnelJason A. Donenfeld2018-12-2213-35/+41
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fix paren typoJason A. Donenfeld2018-12-212-3/+3
| | | | | | "I am very anti-paren." --Eric Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Nuke trailing spacesJason A. Donenfeld2018-12-2126-173/+173
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* providerConfiguration is now a WgQuickConfigEric Kuck2018-12-2119-315/+109
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Do not require NetworkExtension to know its own nameJason A. Donenfeld2018-12-212-15/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* All migration stuff moved to one gross fileEric Kuck2018-12-219-299/+202
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Simplify versioning of stored dataJason A. Donenfeld2018-12-211-26/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Get rid of superflous isActivateOnDemandEnabled keyJason A. Donenfeld2018-12-217-54/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Updated NETunnelProvider save formatEric Kuck2018-12-2123-223/+663
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* NE: simplify logicJason A. Donenfeld2018-12-212-46/+27
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* NE: Simplify DNS resolutionRoopesh Chander2018-12-212-23/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Localize all the thingsRoopesh Chander2018-12-2113-135/+408
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel detail: iPad: Handle deletion of tunnel correctlyRoopesh Chander2018-12-211-3/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Update listen port only when first interface changesRoopesh Chander2018-12-212-4/+27
| | | | | | | When handling network path changes, change the listen port only when the first interface has changed. Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Change handling of bad domain names and Activate On DemandRoopesh Chander2018-12-212-42/+30
| | | | | | | | | | | | | | | | The solution implemented in commit b8c331c causes the tunnel to remain in 'Activating' state, without the ability to cancel that. So, in this commit, instead of retrying DNS silently on Activated-On-Demand tunnels, we fail the startTunnel() silently. To summarize, if activate-on-demand is on: - If started from the WireGuard app, show error using lastErrorFile mechanism, suggesting a way to turn off Activate On Demand - If not started from WireGuard app, don't call displayMessage() (don't show error to user) and silently fail starting the tunnel Signed-off-by: Roopesh Chander <roop@roopc.net>
* Added missing param in MockTunnelsEric Kuck2018-12-201-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Enabled more swiftlint rulesEric Kuck2018-12-2011-13/+22
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added a String->[String] helperEric Kuck2018-12-205-32/+53
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelErrors: Remove unused errorRoopesh Chander2018-12-201-3/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: init() need not take a tunnelConfiguration argumentRoopesh Chander2018-12-192-6/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Log whether tunnel was activated from the app or notRoopesh Chander2018-12-191-0/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove non-helpful commentsRoopesh Chander2018-12-198-13/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: Fix commentRoopesh Chander2018-12-191-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: If only Activate On Demand has changed, don't restart tunnelRoopesh Chander2018-12-192-6/+17
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: Handle bad domain names and Activate On DemandRoopesh Chander2018-12-194-19/+59
| | | | | | | | | | | This combination causes iOS to keep trying to bring up the tunnel, leading to a lot of displayMessage() alerts. In this fix, if we get a DNS resolution error in an Activate On Demand enabled tunnel, we silently retry 9 times (with a 4-second delay before each retry) and then show the displayMessage() alert. Signed-off-by: Roopesh Chander <roop@roopc.net>