Roopesh Chander
273ee04450
Better os() directives
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-22 04:06:37 +05:30
Roopesh Chander
f63c9fd598
macOS: Use tunnelOverheadBytes for automatic MTU in macOS
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2019-01-16 01:51:56 +05:30
Jason A. Donenfeld
49f287439e
PacketTunnelSettingsGenerator: use 127.0.0.1 as dummy address
...
It turns out that using 0.0.0.0 somehow conflicts with DNS lookups when
CLAT is in use.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-08 01:51:12 +01:00
Jason A. Donenfeld
150cd119c7
Avoid dynamic MTU calculations for now
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-07 19:23:39 -05:00
Jason A. Donenfeld
e2384e143c
Update copyright
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-07 19:23:39 -05:00
Jason A. Donenfeld
0b828f9b96
Rework DNS and routes in network extension
...
The DNS resolver prior had useless comments, awful nesting, converted
bytes into strings and back into bytes, and generally made no sense.
That's been rewritten now.
But more fundumentally, this commit made the DNS resolver actually
accomplish its objective, by passing AI_ALL to it. It turns out, though,
that the Go library isn't actually using GAI in the way we need for
parsing IP addresses, so we actually need to do another round, this time
with hints flag as zero, so that we get the DNS64 address.
Additionally, since we're now binding sockets to interfaces, we can
entirely remove the excludedRoutes logic.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-28 19:38:03 +01:00
Jason A. Donenfeld
c9c343cde2
NetworkExtension: rescope socket instead of tearing down socket
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-26 01:17:55 +01:00
Eric Kuck
8553723e04
Updated NETunnelProvider save format
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-21 16:42:16 +01:00
Jason A. Donenfeld
38445114e0
NE: simplify logic
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-21 15:56:03 +01:00
Roopesh Chander
f818cdd963
NE: Update listen port only when first interface changes
...
When handling network path changes, change the listen port
only when the first interface has changed.
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-21 17:32:44 +05:30
Eric Kuck
a89ad95901
Enabled more swiftlint rules
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-20 11:22:37 -06:00
Roopesh Chander
5ae9eec555
Avoid using 'VPN' in code where possible
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-12-13 12:20:10 +05:30
Jason A. Donenfeld
5971c197bd
Remove useless whitespace
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-13 05:26:04 +01:00
Eric Kuck
8a916beb38
More formatting nits and cyclomatic complexity fixes
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-12 21:09:52 -06:00
Eric Kuck
e4ac48bc75
More linter warnings fixed, enabled more swiftlint rules, project cleanup
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-12 15:33:14 -06:00
Eric Kuck
d06cff2a36
Tons more swiftlint warnings fixed. Still a few remaining.
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-12 12:28:27 -06:00
Eric Kuck
de14b76b4d
Added swiftlint and fixed all errors (and a bunch, but not all, warnings)
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-12 11:40:57 -06:00
Jason A. Donenfeld
034a1a12f7
Supply missing pieces of path change
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-12 01:11:43 +01:00
Eric Kuck
9bc7e58487
Fixed a potential race condition, better naming on PacketTunnelSettingsGenerator methods
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-11 16:59:15 -06:00
Eric Kuck
27265fc222
Added an (unfinished) NWPathMonitor implementation for reconnecting on network changes
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-12-11 16:12:04 -06:00
Roopesh Chander
b946cbc0f3
NE: All DNS queries must first go through the VPN's DNS servers
...
Signed-off-by: Roopesh Chander <roop@roopc.net>
2018-11-23 13:04:55 +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