Commit Graph

130 Commits

Author SHA1 Message Date
Davide
12d3bd20f5
Highlight selected server (#752)
Use provider-aware ID.
2024-10-23 18:40:09 +02:00
Davide
48dc31a1f1
Attempt an iOS layout with DisclosureGroup
Also fix missing initial filters based on selection.

Fixes #746
2024-10-23 18:31:24 +02:00
Davide
2455c5397e
Attach provider ID to issue report
Fixes #710
2024-10-23 17:32:49 +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
07a751a237
Fix environment scope for .navigationPath on iOS
Broken in #749
2024-10-23 15:46:00 +02:00
Davide
ee8ef34f06
Avoid nested module navigation (#749)
A NavigationLink in VPNProviderContentModifier raised a few questions
about the navigation approach in module views. It turned out that having
a Binding to a local ObservedObject (ProfileEditor) is a recipe for
disaster.

Therefore:

- We don't need a binding to the editor module (the draft), because by
doing so we end up _observing_ the same changes from two properties, the
binding and the editor. This seems to drive SwiftUI crazy and freezes
the app once we navigate from the module to another view (e.g. in
OpenVPN the credentials or the provider server). Use the module binding
as a shortcut, but do not assign the binding to the view to avoid
unnecessary observation.
- Keep .navigationDestination() in the module view, and pass a known
destination to VPNProviderContentModifier. This will save the modifier
from creating a nested NavigationLink destination. The
VPNProviderServerView is now openly instantiated by the module view when
such destination is triggered by the NavigationLink in the modifier.
- Do not implicitly dismiss VPNProviderServerView on selection, let the
presenter take care. In order to do so, we add a .navigationPath
environment key through which the module view can modify the current
navigation stack.
2024-10-23 15:42:54 +02:00
Davide
a94db35d01
Refactor a few things about provider flows (#748)
- Move disclosable menu from installed profile view to
ThemeDisclosableMenu
- Drop unnecessary configurationType modifier parameter
- Reorg view-related module extensions to separate files
- Reuse .flow fields instead of single blocks
- Show specific error on missing provider server selection
2024-10-22 15:06:13 +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
696f076ac5
Add issue to FIXMEs 2024-10-20 13:00:27 +02:00
Davide
25470e61e5
Lazy-load tunnel logs in Diagnostics
Fixes #743
2024-10-20 01:54:46 +02:00
Davide
ae9e200618
Omit provider in OpenVPN server configuration
Fixes #744
2024-10-20 00:22:49 +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
3de75e476b
Prevent iPad dismiss when tapping outside (#737)
The user may tap outside accidentally while editing a profile, thus
losing all the edits. Avoid that.

Fixes #734
2024-10-16 08:56:58 +02:00
Davide
acf066571a
Fix some key things about providers UI (#736)
Fixes #703
2024-10-16 08:53:16 +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
aeaf0a6eed
Some fixes
- Import remote profiles off the main thread
- Drop meaningless Published
- Add a FIXME to move Profile build logic to library
2024-10-15 23:37:50 +02:00
Davide
8cdd20dfb4
Fix animation in OpenVPNView 2024-10-15 21:39:47 +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
8c76f33d48
Fix copy UUID in correct format 2024-10-11 19:45:58 +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
c96e7e9d6e
Define NE configuration title format in Constants 2024-10-11 17:57:31 +02:00
Davide
619ff807fd
Drop unused code in AppContext 2024-10-11 17:53:41 +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
1aa393ee02
Move feature mapping to a single file (#726)
Do not scatter sensitive data.
2024-10-11 04:17:17 +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
9449a02b77
Add meaningful prefix to keychain entries (#724)
Hard to find in keychain, add "Passepartout: " prefix to profile name.
2024-10-11 00:31:32 +02:00
Davide
da87ca698a
Add initial support for providers (#723)
Initial integration of providers via API:

- Generic views and modifiers for provider/server selection
- Add in OpenVPNView
- Prepare in WireGuardView

Also:

- Introduce ProfileProcessor, move IAP processing there
- Move .asModuleView() to ModuleViewModifier for proper animation
- Use .themeModal() rather than .sheet()
2024-10-11 00:24:06 +02:00
Davide De Rosa
6d6eef43c9
Rename 2024-10-10 16:24:09 +02:00
Davide
d589f1162d
Reorganize shared objects (#716)
Mainly:

- Aggregate shared/mock entities in less scattered files
- Review package dependencies

Also:

- Decouple ProfileRepository from Core Data Repository in UtilsLibrary
(filters done by ProfileManager)
2024-10-10 16:20:36 +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
6d479a7059
Render multiple translators in Credits (#701) 2024-10-09 21:42:42 +02:00
Davide
df2fc54044
Render profile UUID as quartets (#700)
Easier to read.
2024-10-09 21:40:56 +02:00
Davide De Rosa
635700c195
Revisit OpenVPN view
- Move pull section below
- Add IPv6 to preview
2024-10-06 19:22:45 +02:00
Davide De Rosa
7078e5c435
Unrestrict previews 2024-10-06 19:22:44 +02:00
Davide
504bcbdbd2
Refactor and move entities around (#698)
Do some housekeeping in AppLibrary/AppUI.
2024-10-06 19:19:16 +02:00
Davide
f4505d0efd
Refactor ProfileEditor to leverage ProfileType (#689)
Closes #688
2024-10-06 13:41:02 +02:00
Davide De Rosa
8b5096ab69
Make copiable text multiline by default 2024-10-05 00:17:08 +02:00
Davide De Rosa
38aa83760f
Reword on-demand 2024-10-04 21:06:03 +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
d14f22d4a1
Use gear icon for iOS About (#684)
Resolve a discrepancy between iPhone and iPad. Leave the info icon on
macOS, where Settings are separate.
2024-10-04 18:27:09 +02:00
Davide De Rosa
eea5486563
Fix crash on "Report issue" 2024-10-04 15:48:13 +02:00
Davide De Rosa
1b5e123fa6
Use .compact style in list based on size class 2024-10-04 11:39:50 +02:00
Davide De Rosa
e75c264258
Go multiline rather than truncate copiable
Fixes #682
2024-10-04 10:40:18 +02:00
Davide De Rosa
71149e87d3
TODO -> FIXME 2024-10-04 10:30:14 +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
4b0bc7f064
Reword confirm quit 2024-10-04 02:59:03 +02:00
Davide De Rosa
00bf415056
Move modules tip to +/- 2024-10-04 02:57:09 +02:00
Davide De Rosa
7070661c3b
Group row components and make icons bigger
Fixes #678
2024-10-04 02:52:02 +02:00
Davide De Rosa
fe8fa93230
Fix SwiftGen warning 2024-10-04 02:44:19 +02:00
Davide De Rosa
27b7e62376
Add hint about iCloud sharing 2024-10-04 00:52:25 +02:00
Davide De Rosa
b660c499af
Use static 'Profile' in editor title 2024-10-04 00:47:28 +02:00
Davide De Rosa
07703fda9c
Fix some things about IP module
- Reword module description to "Routing"
- Make route modal title .inline
2024-10-04 00:44:31 +02:00
Davide De Rosa
ca03d057fc
Fix iCloud icon and move to the right 2024-10-04 00:39:41 +02:00
Davide De Rosa
fc834ab367
Replace Section with .themeSection
Closes #676
2024-10-03 23:32:31 +02:00
Davide
211b3b83d3
Erase iCloud store from Settings (#675)
Also, fix SwiftUI not refreshing when remote profiles are updated. There
was no objectWillChange nor Published around
ProfileManager.allRemoteProfiles, and ProfileRowView was not treating it
as ObservedObject.

Closes #673
2024-10-03 23:25:51 +02:00
Davide De Rosa
bf4ec4982a
Refactor phrases 2024-10-03 19:42:52 +02:00
Davide De Rosa
73665c5436
Use extended layout in profile list 2024-10-03 18:42:37 +02:00
Davide
1491766102
Per-profile iCloud syncing (#668)
Keep two separate stores to accomplish per-profile sharing:

- Local store, where to push updates manually (save/remove/search)
- Remote iCloud store, where to pull updates from

A profile can be added/removed to/from the iCloud store so that other
devices can push/pull updates to it.

Consequently, updates to the iCloud store will NEVER cause a profile
deletion. Once removed, the profile will stay locally.

Fixes #586 
Fixes #555
2024-10-03 18:41:27 +02:00
Davide De Rosa
1227df60ff
Present popover from button 2024-10-03 17:53:19 +02:00
Davide
8ad144239e
Present modules tip as popover on macOS (#672) 2024-10-03 17:50:19 +02:00
Davide De Rosa
429e79cd3a
Refactor theme section and some phrases 2024-10-03 17:35:57 +02:00
Davide
0917e47ea3
Granularize app features (#671)
Split .networkSettings and add .sharing for #668
2024-10-03 12:13:03 +02:00
Davide
63b0199a39
Merge Settings into About on iOS (#670)
Closes #669
2024-10-03 11:25:39 +02:00
Davide
e8d5f2477b
Prepare interactive login for paywall (#663)
See #662
2024-10-02 16:05:40 +02:00
Davide De Rosa
f602655568
Link TODOs to issues 2024-10-01 15:50:12 +02:00
Davide De Rosa
bef1d36aa4
Fix annoying singleton warning 2024-10-01 15:45:53 +02:00
Davide De Rosa
087f177bd7
Omit storage section in release 2024-10-01 09:57: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
aead866275
Open app with multiple files (#640)
onOpenURL cannot handle multiple URLs on macOS, whereas
NSApplicationDelegate can.

Fixes #637
2024-09-30 17:22:16 +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
a29495a69c
Decouple Constants from BundleConfiguration (#635)
Fixes #619
2024-09-28 19:05:47 +02:00
Davide
28a2017da2
Confirm quit on macOS (#634)
To do so, must prevent window from closing.

Fixes #223
2024-09-28 17:58:48 +02:00
Davide
5deb8ec763
Prepare for macOS settings (#629) 2024-09-28 12:47:33 +02:00
Davide
9e6e59276b
Associate and handle imported files (#628) 2024-09-28 11:43:57 +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