Commit Graph

11 Commits

Author SHA1 Message Date
Jason A. Donenfeld
7bf3d7b09d Update copyright 2019-01-07 19:23:39 -05:00
Jason A. Donenfeld
0b2d91a7f4 Localize remaining strings in network extension 2018-12-22 03:42:01 +01:00
Jason A. Donenfeld
137d453c0d Do not require NetworkExtension to know its own name 2018-12-21 22:05:47 +01:00
Jason A. Donenfeld
df698658d2 Get rid of superflous isActivateOnDemandEnabled key 2018-12-21 18:50:32 +01:00
Roopesh Chander
115e057d96 NE: Change handling of bad domain names and Activate On Demand
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
2018-12-21 15:52:47 +05:30
Roopesh Chander
b8c331c72d NE: Handle bad domain names and Activate On Demand
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.
2018-12-19 15:38:00 +05:30
Roopesh Chander
e6c1e46b1d NE: Communicate last error to app through a shared file 2018-12-14 02:24:53 +05:30
Eric Kuck
965f66e5e2 More linter warnings fixed, enabled more swiftlint rules, project cleanup 2018-12-12 15:33:14 -06:00
Eric Kuck
ea29a0c7d1 Tons more swiftlint warnings fixed. Still a few remaining. 2018-12-12 12:28:27 -06:00
Eric Kuck
fa558a4019 Added swiftlint and fixed all errors (and a bunch, but not all, warnings) 2018-12-12 11:40:57 -06:00
Roopesh Chander
c9c58f3755 NE: When there's an error starting the tunnel, show it to the user using displayMessage() 2018-11-09 17:07:42 +05:30