Commit Graph

6 Commits

Author SHA1 Message Date
Davide De Rosa 0c77062add
Add SwiftLint (#318) 2023-04-20 21:52:45 +02:00
Davide De Rosa 422f3163d3
Reuse native WireGuard error as ConfigurationError (#316)
There was a duplicate ConfigurationError.
2023-04-02 23:42:05 +02:00
Davide De Rosa 7ce254be02
Extend WireGuard with DoH/DoT options (#314) 2023-03-19 08:22:30 +01:00
Davide De Rosa fa5aa86399 Use keypath in .map occurrences 2022-10-27 00:37:24 +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 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