Commit Graph

20 Commits

Author SHA1 Message Date
Davide De Rosa 36ed23ccc4 Bump to OpenSSL 1.1.1o 2022-06-17 10:06:03 +02:00
Davide De Rosa e12e0b3051 Make VPN public methods async
- With Swift Concurrency
- Raise targets to iOS 13 / macOS 10.15
2022-04-06 11:18:06 +02:00
Davide De Rosa 990a0b85a6 Use WireGuardKit fork with platform fixes
- iPhone Simulator
- Catalyst
2022-04-06 09:31:33 +02:00
Davide De Rosa 69a00834cb Fix missing WireGuard dependency on SwiftyBeaver 2022-03-13 22:40:49 +01: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 871e51517c Relax macOS target to 10.14
Requires updating OpenSSL package.
2022-02-02 23:24:29 +01:00
Davide De Rosa fda232edcb
Add WireGuard package (#236)
* Add WireGuard packages

- Use eduVPN script for WireGuardKitGo
- Wrap WireGuardKit entities into Configuration
- Split demo into OpenVPN/WireGuard controllers

* Rewrite README with multiple VPN protocols
2021-12-01 13:54:00 +01:00
Davide De Rosa d1e8f70da3 Bind to OpenSSL 1.1.1l 2021-11-25 12:40:56 +01:00
Davide De Rosa e8f7778179 Use semantic version for OpenSSL 2021-11-25 09:30:24 +01:00
Davide De Rosa b6d3cdc3b1
Revert to OpenSSL (#233)
* Use an OpenSSL binary without Bitcode
* Restore TLS security level override
* Disable Bitcode completely in Demo
2021-11-24 16:40:19 +01:00
Davide De Rosa 8e6624e113 Strip dependencies on TunnelKitCore
- TunnelKitManager
- TunnelKitIKE
- TunnelKitOpenVPNManager
2021-11-23 13:17:52 +01:00
Davide De Rosa 77b9aad500 Use a lower iOS target 2021-11-16 13:46:07 +01:00
Davide De Rosa bc776eda85 Replace OpenSSL with BoringSSL from SwiftNIO SSL
- Raise iOS target to 13
- Drop support for TLS security level
- Address warnings about integer conversion (iOS)
2021-11-12 10:00:46 +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 d1f70171cb Lower SwiftPM version to 5.3 2021-11-06 11:37:26 +01:00
Davide De Rosa 3a546ebfbb Exclude main() from LZO package 2021-11-04 17:31:19 +01:00
Davide De Rosa b86a72ebde Drop redundant test dependency 2021-11-03 19:30:19 +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