Commit Graph

11 Commits

Author SHA1 Message Date
Davide De Rosa 6ab1759e04
Update copyright 2024-01-14 14:33:14 +01:00
Davide De Rosa 92bc00e1fd
Skip notifications without a bundle identifier
Would raise fatalError in notification getter.
2023-12-27 17:45:49 +01:00
Davide De Rosa c56bfd7224
Attach user data to VPN configuration (#400) 2023-12-24 00:40:42 +01:00
Evgeny bda84bf569
Add WireGuard RX/TX data statistics (#341)
Co-authored-by: Yevgeny <y.yezub@gmail.com>
Co-authored-by: Davide De Rosa <keeshux@gmail.com>
2023-12-14 22:01:26 +01:00
Davide De Rosa 0c77062add
Add SwiftLint (#318) 2023-04-20 21:52:45 +02:00
Davide De Rosa d7fbeb0d90 Update copyright 2023-03-17 16:58:36 +01:00
Davide De Rosa 080ee35e61
Replace continuations with natively async methods (#284) 2022-10-12 22:28:33 +02:00
Davide De Rosa e2aaffc06f Reconnect with current manager and configuration 2022-08-05 07:38:53 +02:00
Davide De Rosa 6e0471a55b Report vpnIsEnabled = false on install error 2022-04-27 15:44:40 +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 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