Commit Graph

28 Commits

Author SHA1 Message Date
Davide
2f67bcbbf2
Sync local profiles consistently (#1051)
Rather than redoing ProfileManager.observeLocal() altogether:

- Keep the existing profiles subscription (localSubscription)
- Reload ALL local profiles on NE notifications

The reload is "heavy" because each profile save causes a reload of ALL
profiles, but it's the most reliable approach and in the end, it only
takes 1-2msec. It can be improved later.

Partially reverts #1049, because the app did not sync when a VPN
configuration was deleted from the OS settings.
2025-01-04 23:42:10 +01:00
Davide
be72e4af61
Speed up detection of OpenVPN ping timeout 2024-12-30 10:54:10 +01:00
Davide
df6f3d1fb1
Fix macOS not reconnecting on wake-up (#1046)
Resolve persistent DNS failures in the library. DNS requests were likely
going through a stale tunnel.
2024-12-27 17:10:35 +01:00
Davide
4454a198b9
Handle non-ASCII credentials in OpenVPN (#1045)
Not a regression, just a long-going drag from TunnelKit.
2024-12-27 17:01:25 +01:00
Davide
a9becd17ad
Fix disconnection on OpenVPN renegotiation (#1032)
Affecting servers with --tls-auth or --tls-crypt enabled. It turned out
to be an extremely old drag from TunnelKit.

See https://github.com/passepartoutvpn/passepartoutkit-source/pull/443
2024-12-20 21:12:36 +01:00
Davide
26e97625fa
Update library with HARD_RESET fix (#1028)
https://github.com/passepartoutvpn/passepartoutkit-source/pull/441
2024-12-20 09:56:08 +01:00
Davide
1f81c3dfea
Resolve NEVPNErrorDomain error and profile duplication on first import (#1026)
Fixes #1025
2024-12-18 17:26:35 +01:00
Davide
fbfa600d67
Use tagged PassepartoutKit packages (#1021)
Closes #956
2024-12-17 18:57:45 +01:00
Davide
ffb8829f4f
Reorganize Core Data containers (#1017)
Before anything, remove any code related to App Group containers from
tvOS target because they are not available. Include the beta receipt
override, it's broken for that reason.

In short:

- Store all Core Data containers locally. Do not use the App Group for
Core Data for consistency across platforms.
- Store logs in the App Group on iOS/macOS, but locally on tvOS (see
`urlForCaches`).

Then, rather than one container per model, merge models into:

- Local: Providers
- Remote: Profiles + Preferences (now in the same CloudKit container)

Reuse the remote model for backups too.

This change is safe because:

- Local profiles are stored via Network Extension in the keychain, not
Core Data
- Remote profiles are re-imported via CloudKit sync
- Providers are re-downloaded on first use
- Preferences are lost, but they are "cheap" data
- Profile backups are lost, but they were hidden anyway
2024-12-15 20:20:33 +01:00
Davide
a04c1072c8
Allow Ethernet on-demand on all platforms (#1012)
Fixes #1010
2024-12-14 21:59:25 +01:00
Davide
f82bf92a51
Update library to uniform version 2024-12-12 23:53:01 +01:00
Davide
f441a2eed0
Autogenerate screenshots for all platforms (#998)
Unframed for now.

- Split Main/TV targets
- Extend ProfileManager for screenshot scenarios
- Rename UITesting to UIAccessibility

Active profile looks very big on TV simulator, temporarily commented
`.padding(.top, 50)` in ActiveProfileView.

Closes #974
2024-12-10 18:06:23 +01:00
Davide
a4ebea1f95
Handle load/save preferences inside ProfileEditor (#982)
Simplify preferences model by doing a bulk load/save together with
load/save Profile. ModulePreferences is now a struct rather than an
ObservableObject, because it doesn't need ad hoc observation. It's just
a binding to ProfileEditor.preferences

Fix:

- Disable CloudKit in tunnel singleton of PreferencesManager
(.sharedForTunnel)

Additionally:

- Replace MainActor in PreferencesManager with Sendable (immutable)
- Replace MainActor from ProviderPreferencesRepository with Sendable
(syncs on NSManagedObjectContext)
- Drop ModuleMetadata for good
2024-12-08 16:05:23 +01:00
Davide
36b8024e5b
Fix deadlock regression in DNS resolution 2024-12-06 15:25:45 +01:00
Davide
e663f48bc3
Update library
- Make userInfo AnyHashable
- Prepare for profile processing in tunnel
2024-12-06 11:25:54 +01:00
Davide
dfae6afcb4
Store complex preferences to Core Data (#981)
Replace favorites entities with a PreferencesManager, that returns
observables for:

- Module preferences (by module UUID)
- Provider preferences (by ProviderID)

Automate preferences availability in:

- Module views (empty for now)
- VPN server view (favorites)

Synchronize preferences by making this a CloudKit container. Preferences
are also available in the Tunnel by storing the container in the App
Group.
2024-12-06 11:24:51 +01:00
Davide
0fd544348f
Disclose details about selected provider server configuration (#980)
Like in v2.
2024-12-04 20:50:51 +01:00
Davide
79bb6e6bdb
Update library again
- Drop -Type suffixes from associated types
- Rename to IdentifiableConfiguration
2024-12-04 13:47:26 +01:00
Davide
355974292e
Update library with provider entities (#978) 2024-12-04 12:40:47 +01:00
Davide
d4543b49ac
Update library with Provider.Metadata renaming 2024-12-04 09:26:10 +01:00
Davide
0aaef04a25
Refactor with provider customizations (#976)
Update library with new API.
2024-12-03 20:28:33 +01:00
Davide
2d93fa64c6
Embrace simplifications in PassepartoutProviders (#975)
Update library with the new domain reorganization.
2024-12-03 16:18:05 +01:00
Davide
7611f6f7d2
Fix a tunnel crash during DNS resolution 2024-12-02 18:59:18 +01:00
Davide
3540e1cb1a
Redesign confusing paywall (#973)
- Split suggested product and full version
- Hide sections with no products
- Hide full features if no full products
- Fail if no purchasable products
2024-12-02 10:40:25 +01:00
Davide
a2544b33ac
Hide OpenVPN password if provider does not require it (#970) 2024-12-02 00:01:35 +01:00
Davide
f87cc1da0b
Fix OpenVPN/WireGuard import error messages (#967)
OpenVPN parser was indirectly swallowing WireGuard errors.
2024-12-01 21:33:58 +01:00
Davide
1a25102ec3
Add guidance for OpenVPN provider credentials (#966)
Some providers require specific credentials for OpenVPN, different from
account credentials. Update the API index with this information to show
an information footer and possibly a link to the OpenVPN credentials.

Also, fix the OTP footer not appearing on macOS.
2024-11-29 15:25:22 +01:00
Davide
7af703c164
Move app library to the root (#962)
Makes it easier to search among app files and library files.
2024-11-28 17:45:18 +01:00