aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Key: Constant time encodingJason A. Donenfeld2019-02-081-12/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Better os() directivesRoopesh Chander2019-01-221-1/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* macOS: Use tunnelOverheadBytes for automatic MTU in macOSRoopesh Chander2019-01-161-4/+8
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* PacketTunnelSettingsGenerator: use 127.0.0.1 as dummy addressJason A. Donenfeld2019-01-081-3/+1
| | | | | | | 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>
* Avoid dynamic MTU calculations for nowJason A. Donenfeld2019-01-071-5/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Update copyrightJason A. Donenfeld2019-01-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Rework DNS and routes in network extensionJason A. Donenfeld2018-12-281-35/+3
| | | | | | | | | | | | | | | | | 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>
* NetworkExtension: rescope socket instead of tearing down socketJason A. Donenfeld2018-12-261-7/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Updated NETunnelProvider save formatEric Kuck2018-12-211-5/+4
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* NE: simplify logicJason A. Donenfeld2018-12-211-7/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* NE: Update listen port only when first interface changesRoopesh Chander2018-12-211-2/+10
| | | | | | | When handling network path changes, change the listen port only when the first interface has changed. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Enabled more swiftlint rulesEric Kuck2018-12-201-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Avoid using 'VPN' in code where possibleRoopesh Chander2018-12-131-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove useless whitespaceJason A. Donenfeld2018-12-131-9/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* More formatting nits and cyclomatic complexity fixesEric Kuck2018-12-121-94/+59
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More linter warnings fixed, enabled more swiftlint rules, project cleanupEric Kuck2018-12-121-1/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Tons more swiftlint warnings fixed. Still a few remaining.Eric Kuck2018-12-121-12/+10
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added swiftlint and fixed all errors (and a bunch, but not all, warnings)Eric Kuck2018-12-121-9/+9
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Supply missing pieces of path changeJason A. Donenfeld2018-12-121-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fixed a potential race condition, better naming on PacketTunnelSettingsGenerator methodsEric Kuck2018-12-111-2/+2
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added an (unfinished) NWPathMonitor implementation for reconnecting on network changesEric Kuck2018-12-111-0/+14
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* NE: All DNS queries must first go through the VPN's DNS serversRoopesh Chander2018-11-231-1/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: Refactor PacketTunnelOptionsGenerator into a PacketTunnelSettingsGeneratorRoopesh Chander2018-11-081-0/+203
Signed-off-by: Roopesh Chander <roop@roopc.net>