Commit Graph

19 Commits

Author SHA1 Message Date
Davide De Rosa 729e8973cf
Hide errors behind façade TunnelKit*Error (#325) 2023-07-02 11:56:40 +02:00
Davide De Rosa 0c77062add
Add SwiftLint (#318) 2023-04-20 21:52:45 +02:00
Davide De Rosa e0c0cc137f
Split DNS domain and search domains (#313) 2023-03-17 20:22:21 +01:00
Davide De Rosa d7fbeb0d90 Update copyright 2023-03-17 16:58:36 +01:00
Tejas Mehta 5ecd732cc2
Add Complete XOR Patch Functionality (#255)
Co-authored-by: Davide De Rosa <keeshux@gmail.com>
2022-11-06 17:46:10 +01:00
Davide De Rosa cae371bb40
Split IPv4/6 settings and routes (#298)
* Postpone setting route gateway

Resolve in NetworkSettingsBuilder.

* Store routes separately from IP*Settings

Parse as optionals to avoid empty arrays.

* Deprecate routes stored in IP*Settings

* Apply routes from new fields

* Update CHANGELOG
2022-10-29 12:24:28 +02:00
Davide De Rosa 703d1416ad
Deal with remote options properly (#297)
Some take over, some are merged.

Also:

- Drop non-existing DOMAIN-SEARCH dhcp-option

- Only first DNS domain was parsed
2022-10-29 11:00:39 +02:00
Davide De Rosa fa5aa86399 Use keypath in .map occurrences 2022-10-27 00:37:24 +02:00
Davide De Rosa 7659057888
Parse IPv6 enpdoints properly (#294)
* Fix incorrect parsing of IPv6 address in endpoint

* Use better names for space-based regex extensions
2022-10-25 11:29:36 +02:00
Davide De Rosa 31db8ebb9d
Delegate network settings to ad-hoc builder (#292)
* Delegate network settings to ad-hoc builder

- Assert network settings nil or non-empty, NOT precondition

- Fix log about local DNS, only if not gateway

- Remove non-working block-local code

Fixes #289, fixes #290

* Unmask safe and helpful network settings
2022-10-25 08:58:34 +02:00
Davide De Rosa 17c272d733
Support --remote-random-hostname (#286) 2022-10-17 09:00:23 +02:00
Davide De Rosa a3822678cf
Support --route-nopull (#280)
* Parse --route-no-pull

When provided, pull everything except:

- Routes
- DNS
- Proxy

Implement with higher granularity compared to OpenVPN.

* Apply no-pull mask in tunnel settings

Pull server settings by default to match standard OpenVPN
behavior. Library was prioritizing client over server.

* Add link in CHANGELOG
2022-10-08 08:54:55 +02:00
Davide De Rosa 64b3fa47af Add some missing documentation 2022-09-23 21:45:04 +02:00
Davide De Rosa 133b4b2337 Replace hostname/endpointProtocols with remotes
Like official OpenVPN options.
2022-03-05 14:20:29 +01:00
Davide De Rosa c019cecbe0 Improve some things about OpenVPN.Configuration
- Treat empty passphrase as no passphrase
- Parse authentication requirement from --auth-user-pass
- Overload ConfigurationParser with String parameter
- Move OpenVPN fallbacks inline with builder

Give a withFallbacks: option to initialize basic fields rather
than leaving them nil.
2022-03-03 13:44:40 +01:00
Davide De Rosa 2646762bb4 [ci skip] Update copyright 2022-02-04 12:57:40 +01:00
Davide De Rosa 430e0e6afb Handle --keepalive option 2022-01-04 09:21:45 +01:00
Davide De Rosa 9e14f33235 Drop jazzy, will use DocC 2021-11-12 10:00:55 +01:00
Davide De Rosa 50064fc3d0 Increase components granularity
Minimize target dependency on OpenSSL (easier to drop later).

Outside of OpenVPN tunnel extension, OpenSSL is only used to
decrypt encrypted private keys in CryptoContainer (found in
TunnelKitOpenVPNCore, therefore "temporarily" dependent on
CTunnelKitOpenVPNAppExtension for TLSBox/CryptoBox).
2021-11-11 15:18:03 +01:00