aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move all source files to `Sources/` and rename WireGuardKit targetsAndrej Mihajlov2020-12-039-850/+0
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardKit: Change getWireGuardVersion() -> wireGuardVersionAndrej Mihajlov2020-12-031-2/+1
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardKit: Add wrappers for PrivateKey, PublicKey, PreSharedKeyAndrej Mihajlov2020-12-021-11/+7
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* iOS/macOS: Integrate WireGuardKitAndrej Mihajlov2020-12-023-1/+4
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardKit: Add WireGuardKitCTarget with private C sourcesAndrej Mihajlov2020-12-023-216/+0
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* WireGuardKit: Move shared structs to WireGuardKitAndrej Mihajlov2020-12-026-318/+0
| | | | Signed-off-by: Andrej Mihajlov <and@mullvad.net>
* Update repo urlsJason A. Donenfeld2019-12-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Keychain: make verification errors only happen when we're sure it's due to not foundJason A. Donenfeld2019-10-111-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WgQuickConfig: Swift treats \r\n as a single characterJason A. Donenfeld2019-06-281-1/+1
| | | | | | | | | | | | | | | | let blah = "hello\nworld\ndoes\nthis\nwork" print(blah.split(separator: "\n")) //output: ["hello", "world", "does", "this", "work"] let blah2 = "hello\r\nworld\r\ndoes\r\nthis\r\nwork" print(blah2.split(separator: "\n")) //output: ["hello\r\nworld\r\ndoes\r\nthis\r\nwork"] //expected: ["hello\r", "world\r", "does\r", "this\r", "work\r"] In blah2, the string splitting fails because swift considers \r\n to be its own character. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelsManager: store UID on macOS for keychain availabilityJason A. Donenfeld2019-06-111-6/+23
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Log view: Don't use a global array to store log entriesRoopesh Chander2019-04-102-3/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Swift 5 migration: Handle changes in Data's pointer interfaceRoopesh Chander2019-04-091-6/+32
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Swift 5 migration: Fix switch warningsRoopesh Chander2019-04-091-0/+6
| | | | | | | | | | We now get a warning when switching over enums from system frameworks even when we handle all public cases because there can be future cases that aren't handled. When such a future case is introduced, we'll get a warning. Signed-off-by: Roopesh Chander <roop@roopc.net>
* macOS: Better handling of tunnels created by another userRoopesh Chander2019-04-031-3/+3
| | | | | | Previously, the tunnels just got deleted. Signed-off-by: Roopesh Chander <roop@roopc.net>
* ringlogger: document racesJason A. Donenfeld2019-03-181-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ringlogger: support mpsc for singlefileJason A. Donenfeld2019-03-175-75/+154
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg-quick parser: trim \r as wellJason A. Donenfeld2019-03-111-5/+5
| | | | | | | | The influx of Windows users has already begun to infect our nice project. Reported-by: Cosku Bas <cosku.bas@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Log migration of tunnel configurationRoopesh Chander2019-02-121-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Don't migrate in asTunnelConfiguration()Roopesh Chander2019-02-121-11/+8
| | | | | | | | It causes problems when installing a tunnel through a Configuration Profile on macOS and activating it first through Network Preferences. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Fix writing of preshared key to config formatRoopesh Chander2019-02-091-1/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Global: fix swiftlint issuesJason A. Donenfeld2019-02-081-3/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* KeyEncoding: rename file to match extension filename styleJason A. Donenfeld2019-02-081-0/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Key: we already do len checking in CJason A. Donenfeld2019-02-081-6/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Key: Use C implementation insteadJason A. Donenfeld2019-02-083-111/+159
| | | | | | | Swift compiles so slowly and it's unclear all of the insane type punning was even correct. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Key: Constant time encodingJason A. Donenfeld2019-02-082-7/+159
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* PrivateDataConfirmation: prompt with touch/face/pin/password ID for viewing/exporting keysJason A. Donenfeld2019-02-061-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* LegacyConfig: Remove and support plaintext for .mobileconfigJason A. Donenfeld2019-02-062-205/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Keychain: store configurations in keychain instead of providerConfigJason A. Donenfeld2019-02-064-23/+171
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg-quick conf parser: Handle inline comments correctlyRoopesh Chander2019-02-051-3/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logger: Convert do-catch to try?Roopesh Chander2019-01-281-3/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Config file parsing: Fix bug when there are comments at the endRoopesh Chander2019-01-241-28/+28
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel: support getting runtime configurationJason A. Donenfeld2019-01-242-0/+5
| | | | 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>
* Parsing: Always error on unrecognized keysRoopesh Chander2019-01-141-12/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Parsing: Error on duplicate entriesRoopesh Chander2019-01-141-2/+7
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* macOS: Refactor config file parsingRoopesh Chander2019-01-141-26/+71
| | | | | | | - To report more fine grained errors - To make the parse errors conform to WireGuardAppError Signed-off-by: Roopesh Chander <roop@roopc.net>
* Make app groups work on both iOS and macOSRoopesh Chander2019-01-141-1/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Update copyrightJason A. Donenfeld2019-01-0714-14/+14
| | | | 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>
* All models now EquatableEric Kuck2018-12-216-0/+75
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Localize remaining strings in network extensionJason A. Donenfeld2018-12-221-0/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move model helpers to model directoryJason A. Donenfeld2018-12-224-2/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Move name from interface to tunnelJason A. Donenfeld2018-12-225-16/+17
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Nuke trailing spacesJason A. Donenfeld2018-12-2110-60/+60
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* providerConfiguration is now a WgQuickConfigEric Kuck2018-12-2110-195/+248
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* All migration stuff moved to one gross fileEric Kuck2018-12-218-255/+196
| | | | 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-211-11/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Updated NETunnelProvider save formatEric Kuck2018-12-2114-186/+564
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Enabled more swiftlint rulesEric Kuck2018-12-201-0/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>