Commit Graph

24 Commits

Author SHA1 Message Date
Davide De Rosa 6ab1759e04
Update copyright 2024-01-14 14:33:14 +01:00
Davide De Rosa 3249f14dab
Make release workflow manual 2023-12-14 10:17:46 +01:00
Davide De Rosa 071b6e22ee
Dangling pointers in crypto tests (#349) 2023-12-13 21:11:05 +01:00
Davide De Rosa 8ca928a13b
Convert encryption tests to proper unit tests (#348) 2023-12-13 09:59:57 +01:00
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 17c272d733
Support --remote-random-hostname (#286) 2022-10-17 09:00:23 +02:00
Davide De Rosa 3741a17c20 Rewrite Manager package to make it stateless
In order to avoid chaos from multiple profiles, retain the
profile to be installed and remove all the other ones. Also,
make sure to do the removal AFTER install, as doing it
before would trigger the VPN permission alert again.

XXX: there is some weird behavior from NetworkExtension
occasionally sending notifications with a bogus NEVPNManager
object having a nil .localizedDescription and other properties set
to nonsensical values. Discard the notification when such an object
is identified.

Encapsulate extra NetworkExtension settings:

- passwordReference
- onDemandRules
- disconnectsOnSleep

Also:

- Only set on-demand if any rules are set
- Assume VPN is enabled even with on-demand disabled
- Use DataCount instead of raw Int pair

Attach useful information to VPN notifications:

- VPN isEnabled
- VPN status
- VPN command error
- Tunnel bundle identifier (if available)

Expose specific OpenVPN/WireGuard shared data via extensions in
UserDefaults/FileManager.

Finally, drop incomplete IKE support. No fit.
2022-03-12 10:35:39 +01: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 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 9c63b856cb
Verify CA from on-disk file (#237)
* Verify CA from on-disk file

Revert part of #213 again, because `SSL_CTX_load_verify_locations`
is just more reliable at setting up the trust store.

It looks like it's able to reference the .pem multiple times in
those cases where the root issuer of the CA is also embedded in
the file (which is the case with e.g. Let's Encrypt).

This is better than the current implementation, and I couldn't
easily find a way to do the same in-memory. I'd rather use the
standard API here.

See 7a85d3cac7
2021-11-27 12:32:30 +01:00
Davide De Rosa 7a85d3cac7
Restore and fix former PEM caching PR (#235)
This reverts commit 995009121a.

* Improve error handling

* Trust intermediate CA

* Update CHANGELOG
2021-11-25 12:36:17 +01:00
Davide De Rosa bb5cd1e1ab Return password reference at the time of setting
Simplifies app/extension IPC.
2021-11-23 19:17:43 +01:00
Davide De Rosa 995009121a Revert "Avoid caching PEMs on disk (#213)"
This reverts commit 00d908cc89.
2021-11-18 12:05:06 +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
Davide De Rosa e49e3cad08 Fix test inter-dependencies
Cannot depend on another test target?
2021-11-03 12:14:19 +01:00
Davide De Rosa 92fd620771 Regroup targets
Prefix "internal" modules with underscore.
2021-10-29 23:22:17 +02:00
Davide De Rosa 50ea1ea81a Convert CocoaPods project to SwiftPM 2021-10-26 15:43:10 +02:00