Commit Graph

66 Commits

Author SHA1 Message Date
Davide De Rosa d8563e7f15 Refine linter rules excepting a few 2023-04-20 22:05:11 +02:00
Davide De Rosa 0c77062add
Add SwiftLint (#318) 2023-04-20 21:52:45 +02:00
Davide De Rosa f55724d1b3 Fix demo deployment targets
Fixes #315
2023-03-20 07:20:55 +01:00
Davide De Rosa d7fbeb0d90 Update copyright 2023-03-17 16:58:36 +01:00
Davide De Rosa 36d61c3da5 Enable data count in Demo
It is off by default.

Closes #287
2022-10-28 16:21:34 +02:00
Davide De Rosa e5f4f284fb Replace TunnelBear with ProtonVPN in Demo 2022-10-28 16:10:16 +02:00
Davide De Rosa 83a2842214 Customize app extension log path
Store path into App Group. Do not read it from UserDefaults in
app extension because value is immediately available in provider
configuration.
2022-06-17 09:19:54 +02:00
Davide De Rosa 7b72114893 Fix missing async in Demo 2022-04-12 20:49:21 +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 bbdc21fd61 Fix a few things in demo
- OpenVPN: Set default gateway
- WireGuard: "Connect" button not updated
2022-03-25 18:05:36 +01:00
Davide De Rosa a7a7424257 Use WireGuardKit entities directly
No need to duplicate a well-written API.

- Offer convenience accessors in Configuration[Builder]
- Make Configuration init non-optional

Sanity checks are done in Builder with throws and decoded object
is always deemed valid.
2022-03-12 15:09:41 +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 133b4b2337 Replace hostname/endpointProtocols with remotes
Like official OpenVPN options.
2022-03-05 14:20:29 +01:00
Davide De Rosa 2bcd11fd7e Revisit WireGuard.Configuration
- Make Configuration Codable
- Expose WireGuard ConfigurationError
- Produce ConfigurationBuilder from Configuration
- Support multiple peers
- Make private key a requirement
2022-03-03 13:59:49 +01:00
Davide De Rosa 2646762bb4 [ci skip] Update copyright 2022-02-04 12:57:40 +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 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 bb5cd1e1ab Return password reference at the time of setting
Simplifies app/extension IPC.
2021-11-23 19:17:43 +01:00
Davide De Rosa f1f2dddbf2 Bump demo version 2021-11-23 12:22:07 +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 d977c3317c Fix macOS demo not connecting
Missing keychain sharing capabilities.
2021-11-02 22:30:43 +01:00
Davide De Rosa 50ea1ea81a Convert CocoaPods project to SwiftPM 2021-10-26 15:43:10 +02:00
Davide De Rosa 80472a6cd3 Move Demo into main project 2021-01-03 19:47:25 +01:00
Davide De Rosa c4b86506cf Update Demo and metadata 2021-01-03 17:47:48 +01:00
Davide De Rosa c64cb79bfe Update Demo and tests 2020-12-28 16:34:26 +01:00
Jorge d90a7f0c5e
Update ViewController.swift 2020-11-22 22:02:25 +01:00
Jorge 7eccf701b9
Update ViewController.swift 2020-11-22 22:01:57 +01:00
Davide De Rosa 5c4a4e39c8 Bump version to 3.0.0 2020-11-15 21:24:37 +01:00
Davide De Rosa 8177890d0f Update Demo 2020-11-15 21:12:53 +01:00
Davide De Rosa cf3151788c Upgrade OpenSSL-Apple
- Apple Silicon
- OpenSSL as XCFramework
2020-11-15 21:12:53 +01:00
Davide De Rosa eb247f2c5b Bump deployment targets
- iOS 11.0 -> 12.0
- macOS 10.11 -> 10.15
- Swift 5.0 -> 5.1
2020-11-15 21:12:53 +01:00
Davide De Rosa ca60e3db39 Fix missing configuration title in Demo 2020-11-12 19:29:39 +01:00
Davide De Rosa 10aec5185d Document Manager subspec
Refactor notifications to newer Swift convention.
2020-06-13 17:38:55 +02:00
Davide De Rosa e625360914 Update license headers in Demo 2020-06-13 17:38:55 +02:00
Davide De Rosa eb9eb63658 Reuse code for macOS demo 2020-06-13 17:38:55 +02:00
Davide De Rosa ac46108454 Move parameters to shared Configuration 2020-06-13 17:38:55 +02:00
Davide De Rosa 170c7b9f43 Update Demo with Manager helpers (iOS) 2020-06-13 17:38:55 +02:00
Davide De Rosa 48dcad83e2 Fix tunnel bundle identifiers in Demo
Also fix past CHANGELOG.

Fixes #176
2020-06-13 13:24:35 +02:00
Davide De Rosa 7908ec4d9e Fix App IDs in Demo 2019-11-07 20:42:47 +01:00
Davide De Rosa c40d42c772 Set Swift 5 at Demo project level 2019-06-27 11:01:07 +02:00
Davide De Rosa adcae1686e Update Demo 2019-05-24 16:02:59 +02:00
Davide De Rosa a047d2bdd5 Fix Demo
- Update pods
- Prevent crash when no debug log available (#93)
2019-04-27 22:29:15 +02:00
Davide De Rosa 4f8a669967 Clarify App Groups usage in Demo 2019-04-13 11:04:46 +02:00
Davide De Rosa 07b69f2a34 Prefix App Group with team ID in macOS
Team ID is not a sensitive value.

Fixes #79
2019-04-13 10:40:29 +02:00
Davide De Rosa ef82b86627 Update Demo 2019-04-09 21:02:39 +02:00
Davide De Rosa ed6c3b6113 Update Demo accordingly 2019-04-04 19:31:05 +02:00
Davide De Rosa 4dd8ff3485 Update Demo 2019-04-03 14:18:32 +02:00
Davide De Rosa d43e8eb411 Update pods 2019-03-30 23:18:45 +01:00
Davide De Rosa 5120bcae0a Migrate to Swift 5 2019-03-30 23:18:45 +01:00