Commit Graph

83 Commits

Author SHA1 Message Date
Davide
f48349cde9
Fix duplicated message on import error 2024-10-29 16:30:43 +01:00
Davide
f8773cacf1
Filter countries by selected category (#767)
Countries are filtered through the latest servers list. If a country is
chosen, the countries picker only lists the currently selected country,
because there are no servers from other countries.

Update the library to prefetch the available countries per category.
2024-10-28 20:53:35 +01:00
Davide
7ede841346
Present error alert on missing provider (#766) 2024-10-28 20:30:22 +01:00
Davide
0ec06c2c65
Import OpenVPN configuration (#765)
At module creation time, choose whether to use a provider or import a
configuration file. After the import, the provider picker is hidden for
mutual exclusion.

For clarity, refactor the configuration part of OpenVPNView into a
ConfigurationView subview.
2024-10-28 20:07:19 +01:00
Davide
639dee55ee
Replace 'lastUpdated' with 'lastUpdate' 2024-10-28 17:16:13 +01:00
Davide
0d383ec792
Store providers to Core Data (#763)
Also, improve filters by constraining related fields:

- Pick countries from the filtered category
- Pick presets from those available in the currently filtered servers

Closes #705
2024-10-28 16:57:23 +01:00
Davide
61e8d8e2f7
Optimize redraws in provider servers views (#760) 2024-10-26 20:28:02 +02:00
Davide
3abde3851a
Improve some things about providers (#757)
- iOS: Add category name to clarify servers context
- iOS: Show "No servers" when list is empty
- macOS: Show "Connect" in server selector when presenting from home
- Add last update to issue report
- Refactor provider strings
2024-10-25 11:38:27 +02:00
Davide
2c2b3f063a
Multi-configuration providers (#756) 2024-10-25 10:54:28 +02:00
Davide
5fcb710d5e
Allow creation of OpenVPN provider module (#755)
Behind paywall as per #712 

Fixes #712
2024-10-23 23:19:53 +02:00
Davide
1a82aea612
Optionally apply filters based on server selection (#754)
Restore passing selectedEntity, but add filtersWithSelection to decide
whether to filter servers based on selection.

Partially revert 91a3e42533
2024-10-23 22:57:30 +02:00
Davide
295ba4d662
Quick selection of provider server (#750)
First of all, add country flags assets. Then, present provider server
selector:

- From installed profile view, specifically from a button with the flag
of the current country
- From profile context menu
- On toggle profile when no server is selected

Closes #711
2024-10-23 17:17:20 +02:00
Davide
39bdf145e8
Resolve issues when toggling/switching profiles (#747)
- Drop logic behind connection button tasks, let the library handle
concurrency
- Drop AppContext observation of saved profiles for reconnection, let
save() actively decide
- NETunnelStrategy and NETunnelManagerRepository are now a single entity
- Avoid flickering when toggling same profile
2024-10-22 13:03:34 +02:00
Davide
2155fe1892
Optimize updates in NEProfileRepository (#742)
Currently, NEProfileRepository decodes profiles from ALL NE managers on
any update. This is undesirable considering that:

- Profiles are only _added_ by the app
- Externally, profiles can only be _removed_

Therefore:

- Observe the initial managers to decode the initial profiles from them
- Publish values manually on save/delete (to ProfileManager eventually)
- Observe the subsequent updates for when a profile is removed
externally, i.e. its ID doesn't appear in managers

Fixes #741
2024-10-19 18:22:27 +02:00
Davide
5d2e24792c
Rewrite provider views (#740)
Resolve some flickering and state inconsistency due to overextended
observation of VPNProviderManager. Narrow down its scope to
VPNProviderServerView.

The downside of that, for now, is that servers are loaded "lazily late",
but this flow will make region selection from home easier.

Finally, show filters in popover on iPad.
2024-10-18 18:12:28 +02:00
Davide
0221aea6b6
Move some profile integrity checks to library (#739)
They really belong to Profile.Builder
2024-10-16 09:50:26 +02:00
Davide
9656e5ed29
Filter servers with category/country of selected server (#735)
And use Task for blocking actions in filters.
2024-10-15 23:48:27 +02:00
Davide
ed28126cf7
Rework OpenVPN view with provider modifiers (#733)
Improve rendering and work around some SwiftUI bugs, e.g. with .menu
Picker on iOS (use .navigationLink instead).

Here goes the hierarchy bottom-up:

- ProviderPicker: a Picker wrapper built around ProviderManager
- ProviderContentModifier: adds a ProviderPicker on top and replaces the
content with a set of provider selectors when a provider is selected
- VPNProviderContentModifier: wrapper for ProviderContentModifier that
adds a VPN server selector
- OpenVPNView: provides a view of specific OpenVPN settings, and adds a
credentials selector to the provider/server selectors provided by
VPNProviderContentModifier
2024-10-15 21:34:02 +02:00
Davide
87c7d63678
Redo provider managers lifecycle (#732)
Update library with more efficient choices for interacting with the
providers API.

Fixes #731
2024-10-13 11:36:34 +02:00
Davide
a5d4f6aee5
Unify library iOS target to 15 2024-10-12 15:51:00 +02:00
Davide
9769a151db
Provider configuration is persisted into module (#730)
When e.g. a OpenVPNModule is created without a configuration and a
provider/server is then selected, the ProfileProcessor class serializes
the profile with the provider configuration injected. When the module is
re-edited, we can see the provider server configuration in the module
after selecting "None" as provider.

Instead, validate the provider modules in ProfileProcessor, but generate the provider configuration on the fly in the tunnel.
2024-10-12 13:19:46 +02:00
Davide
208198c3f8
Create OpenVPN module without a configuration (#729)
Update library to allow optional VPN configurations. This in turn allows
a module to be used with a provider, where the configuration is
generated on the fly.
2024-10-11 19:11:42 +02:00
Davide
f2a141a189
Purge stale NetworkExtension/keychain data (#728)
- [x] NE managers were not deleted when unable to be decoded to a
profile
- [x] Keychain items were not deleted on profile removal
- [x] Perform clean-up on app launch
- [x] Perform clean-up on app active

Prematurely merged as #727 then reverted, this is the complete PR.
2024-10-11 17:48:37 +02:00
Davide
8f6192c2b6
Fix extra team prefix in keychain group (#721)
Team ID already included in .xcconfig

Fixes #720
2024-10-11 03:45:20 +02:00
Davide
a0b9529870
Delete keychain entry on profile deletion 2024-10-11 00:25:26 +02:00
Davide
0aac8cd9f3
In-place NetworkExtension profiles (#715)
Profiles are being maintained in two places:

- Core Data
- NetworkExtension

Core Data is redundant for local profiles, so make NetworkExtension the
only source of truth.
2024-10-10 16:03:02 +02:00
Davide
f4505d0efd
Refactor ProfileEditor to leverage ProfileType (#689)
Closes #688
2024-10-06 13:41:02 +02:00
Davide
f66193cf78
Several fixes in ProfileManager (#685)
- [x] Search not accounted for when reloading profiles
- [x] Remote profile being saved twice
- [x] Add some logging
2024-10-04 20:58:11 +02:00
Davide
5fb6f4f4d2
Refactor static functions/entities in Library (#679)
Reduce the impact of hidden dependencies on BundleConfiguration and
Constants.shared

Fixes #656
2024-10-04 09:58:42 +02:00
Davide De Rosa
2d32e099b7
Rename repositories 2024-10-04 02:43:18 +02:00
Davide
3ab80cd076
Fix incorrect VPN status in some cases (#661)
Regression following #636
2024-10-02 13:40:44 +02:00
Davide De Rosa
f4a17e6df8
Restore accidentally removed Package.resolved 2024-10-01 09:58:51 +02:00
Davide De Rosa
5640d4abca
Add another missing key 2024-09-30 21:27:06 +02:00
Davide De Rosa
51cb1d2d38
Fix library about previous commit 2024-09-30 21:08:45 +02:00
Davide
4b1f6e547b
Fix some on-demand behavior (#646)
Fixes #644 
Fixes #645
2024-09-30 19:35:41 +02:00
Davide
0e4dd086ef
Import profiles with on-demand disabled (#641)
Make it friendly to Shortcuts automation by default.
2024-09-30 17:40:24 +02:00
Davide
4877c2bd20
Restrict paywall to on-demand rules (#639)
Rather than whole module.

Closes #638
2024-09-30 15:56:32 +02:00
Davide
a9fa6a2f62
Maintain one configuration per profile (#636)
Helps with automation. Install the VPN configuration before persisting a
profile, so that the 1:1 reference with OS settings is maintained.
Likewise, uninstall the VPN configuration after removing a profile.

This before-save hook also resolves a problem with multiple imports,
where multiple VPN permission alerts coalesce if no VPN configuration is
installed. Now the first import waits for the permission synchronously.

Fixes #618
2024-09-30 14:56:20 +02:00
Davide
989886c434
Fix description of parsing errors on import (#623)
Fixes #607
2024-09-28 00:01:01 +02:00
Davide
fbc6ece59d
Reorganize library into AppUI (#621)
Closes #611
2024-09-26 23:13:55 +02:00
Davide
6cc86e8668
Import v3 code (#597)
Closes #565
2024-09-23 15:02:26 +02:00
Davide De Rosa
10cfc8e54a
Attempt release 2024-09-22 15:55:50 +02:00
Davide De Rosa
64d1131fdd
Update copyright
Closes #473
2024-01-14 14:36:55 +01:00
Davide De Rosa
4836bbac18
Restore proper OpenVPN connectivity (#447) 2024-01-05 23:54:16 +01:00
Davide De Rosa
5c5697762b
Add minimal TV app
Closes #315
2023-12-31 01:21:38 +01:00
Davide De Rosa
fe127e258b
Fix package dependencies 2023-12-17 08:09:51 +01:00
Davide De Rosa
5cfa32dbb7
Add data count to WireGuard connections (#430)
Closes #312
2023-12-14 22:18:20 +01:00
Davide De Rosa
fac06f58db Use versioned TunnelKit 2023-07-06 11:09:59 +01:00
Davide De Rosa
addbf8ab5f Update TunnelKit with keychain fix 2023-07-06 11:05:14 +01:00
Davide De Rosa
b5d230f0b9 Attempt release
Use TunnelKit 6.1.0
2023-07-05 17:16:09 +01:00