Commit Graph

61 Commits

Author SHA1 Message Date
Davide De Rosa 10537c5a29 Fix active profile not always cleared on deletion
Was only cleared if deleted profile was current profile.
2022-04-23 10:25:31 +02:00
Davide De Rosa 8f4e4bc7c5 Skip redundant updates of current profile 2022-04-23 10:25:31 +02:00
Davide De Rosa 2432f0d97a Rewrite ProfileView as a view of currentProfile
Do not load profile in View, instead:

- Load active profile on app launch

- Load selected profile on organizer selection
2022-04-23 10:25:31 +02:00
Davide De Rosa 8838e9d130 Strip a few unnecessary publishers
- Drop unused AppManager from OrganizerView

- Do not notify ProfileManager subscribers on activeProfileId

Saved active profile is already notified by:

- Core Data
- AppManager
2022-04-23 10:25:31 +02:00
Davide De Rosa 322bdf2993 Serialize active profile immediately
Otherwise:

- Switch from former active profile A to B
- Connect to now active profile B
- Kill app
- Reopen app
- App shows connected to profile A

Because active profile was not saved immediately on switch.

Unnecessary now to also save it on background persist().
2022-04-22 10:05:28 +02:00
Davide De Rosa 18e9f7cbb5 Clear profile selection if current profile removed
Do it before ForEach rearranges NavigationLink elements, because
it may trigger undesired navigation to a deleted profile.

Restore related assertion.
2022-04-19 21:19:43 +02:00
Davide De Rosa d2c4298f2d Share same build number in API 2022-04-19 15:56:41 +02:00
Davide De Rosa f1aa192c9c Make App/Core iOS/Catalyst only
- Drop macOS target from Package.swift

- Drop @available attributes
    - UI idiom
    - Intents API
    - Swipe actions in ProviderLocationView

- Review os(iOS)
    - DebugLog, append idiom to tell Mac from iPad

- Drop redundant canImport
2022-04-19 15:56:41 +02:00
Davide De Rosa a6c7305528 Hack around missing .ethernet on Catalyst
Enum seems to be mapped correctly. Make sure matching works on
real device though.

Also noticed that @available on iOS implies availability on
Catalyst as well, making it ineffective e.g. in this case, where
mobile and ethernet network matching should be only available on
iOS and macOS respectively.
2022-04-19 15:56:41 +02:00
Davide De Rosa 5d85699ce4 Delete profile from Organizer
Swipe to delete. Address a couple things on iPad though:

1. Also check provider availability before showing view

fatalError hit on iPad when navigating from a ready provider
profile to a non-ready one. Similar to when navigating between
different VPN protocols.

2. Suppress assertion on deleted profile

Deleting current profile via swipe seems to re-render a new
NavigationLink with the deleted profile, which results in
loading a deleted profile and hitting the assertion. Not sure if
this is a programming error or a glitch in ForEach.
2022-04-19 08:38:10 +02:00
Davide De Rosa f5c87d43c2 Better observe updates explicitly after init 2022-04-18 19:51:07 +02:00
Davide De Rosa 5cafd9794d Review a bit about duplicates handling
- Read profile(withId:) without fetcher

- Refine redundant log about duplicated profiles
2022-04-16 11:27:31 +02:00
Davide De Rosa 0db3e36bf4 Make network settings consistent
- Group DNS "Enabled" and protocol into configuration

- Make DNS servers / search domains optional

- Make proxy bypass domains optional

Also refine a comment about future on-demand.
2022-04-14 07:43:44 +02:00
Davide De Rosa d5340b0457 Fix another import issue in TunnelKit 2022-04-13 22:57:00 +02:00
Davide De Rosa dfebb60796 Fix an import issue in TunnelKit 2022-04-13 22:41:12 +02:00
Davide De Rosa 2565b9f3d0 Lock network settings for builds >= 3000 2022-04-13 21:25:24 +02:00
Davide De Rosa a3202bb218 Refine again how proxy settings apply
Only set bypass domains if manual configuration.
2022-04-13 20:00:39 +02:00
Davide De Rosa ad38ca5942 Skip bypass domains for proxy configured with PAC 2022-04-13 19:45:27 +02:00
Davide De Rosa addbc181fd Make proxy configuration a 3-state
- Manual: server, port
- PAC: set PAC URL
- Disabled

BEWARE: breaking change in Profile.
2022-04-13 19:38:36 +02:00
Davide De Rosa 9055fec394 Fix on-demand rules dropped completely
Must only ignore custom rules if ineligible.
2022-04-13 19:12:16 +02:00
Davide De Rosa 2273ebd8b5 Do not log duplicates renamed if there is none 2022-04-13 11:16:38 +02:00
Davide De Rosa 3a3d2460a8 Fix migration not recovering auth-user-pass option
Was looking up new UUID, not migrated one.
2022-04-13 11:13:38 +02:00
Davide De Rosa 1532e8808b [ci skip] Address CI and ASC validation issues
- Skip tests until fixed wg-go issue

- Add golang step

- Set "Apple Development" at project level

- Set Catalyst platform for gym

- Drop TARGET env variable clashing with WireGuardKit

- Disable SwiftGen script phase

- Fix TunnelKit segfault on archive

- Xcode 13.2.1 compatibility
    Fix some issues with @MainActor
    Use #available instead of #unavailable

- Raise timeout from 10 to 15 minutes

- Update beta description

- Tunnel bundle ids cannot have periods

- CFBundleDisplayName required in tunnels
2022-04-13 10:00:29 +02:00
Davide De Rosa b62490b88b Disable tests failing due to WireGuardKit 2022-04-12 18:41:58 +02:00
Davide De Rosa e663dbff11 Fix inverse condition in current profile deletion 2022-04-12 18:09:30 +02:00
Davide De Rosa ec3cca05ef Fix TunnelKit package fetched locally 2022-04-12 15:25:38 +02:00
Davide De Rosa 4aba5f46aa Rewrite app in SwiftUI 2022-04-12 15:12:45 +02:00
Davide De Rosa a15abe94db [ci skip] Use versioned TunnelKit 2022-02-15 08:58:03 +01:00
Davide De Rosa 750cee97c0 Only commit package resolution in main project
Core resolution raises dirty repo in actions otherwise.
2022-02-04 13:10:50 +01:00
Davide De Rosa 0daed83a14 Update copyright 2022-02-04 12:44:30 +01:00
Davide De Rosa 39e7146dcd Fix TunnelKit reference 2022-02-04 12:24:43 +01:00
Davide De Rosa 31361bf0d8 Attempt beta release 2022-02-04 12:19:18 +01:00
Davide De Rosa 2ab709401f Trim whitespaces in text fields 2022-02-04 12:18:44 +01:00
Davide De Rosa 08008dda23 Try lower macOS target to 10.14
Requires TunnelKit update.
2022-02-02 19:36:23 +01:00
Davide De Rosa de526e238f Commit resolved packages 2022-01-04 09:50:40 +01:00
Davide De Rosa d55fb5dc0f Attempt beta release 2022-01-04 09:26:55 +01:00
Davide De Rosa 9ecb90b8f9 Handle --keepalive option 2022-01-04 09:25:13 +01:00
Davide De Rosa 05a460d55f Attempt beta release 2021-12-08 16:11:38 +01:00
Davide De Rosa 2a5c231d3d
Polish release workflow (#207)
* Do run tests in beta

- Test and build app in same lane
- Run tests with swift directly
- Set timeout on build only
- Set GYM_OUTPUT_DIRECTORY inline
- Fix bad build number, broken in db075eb
- Ignore updates to CHANGELOG for testing
- Drop unnecessary exports
- Drop unnecessary test env
- Drop unused PLATFORM .env.* variable

* Work around gym issues in CI

- Set custom build paths for proper clean-up
- Disable xcpretty (seems to hang job)

* Add descriptive names to workflow

- Rename beta to release
- Add job names

* Optimize release workflow

- Use a matrix for multiplatform build
- Only preinstall platform-specific certificates
- Output app version/build early for job reuse
- Do not depend app review on public beta release
- Pull latest commits before pushing/tagging

In release, ci/* scripts require Ruby. Make version an argument
of the commit-release.sh script to fix dependency.

* Import secret to notify external testers or not

* [ci skip] Add CHANGELOG preface in local scripts

* [ci skip] Update links to release via CI
2021-12-03 15:31:19 +01:00
Davide De Rosa 8653f059b8 Trigger on beta commit message 2021-11-30 12:49:35 +01:00
Davide De Rosa 51821660d2 Commit build number with beta
Pick base build number from env, not project. Can now drop
fetch-depth 0 from workflow, no needs for commits count.
2021-11-29 19:06:59 +01:00
Davide De Rosa b00a7a8ade Set beta release 2021-11-27 12:43:19 +01:00
Davide De Rosa cb3c2401c7 Fix newer infrastructure discarded over bundle 2021-11-27 12:39:35 +01:00
Davide De Rosa e8f2ef0a88 Use versioned TunnelKit 2021-11-25 13:07:07 +01:00
Davide De Rosa 104c856e45 Fix PEM caching PR in TunnelKit 2021-11-25 12:23:28 +01:00
Davide De Rosa cda63b44e5 Restore PEM caching PR in TunnelKit 2021-11-24 17:04:07 +01:00
Davide De Rosa 46fef91f5c Revert to TunnelKit with OpenSSL
- Remove extra "Frameworks" in .appex
- Restore TLS security level 0
- Disable Bitcode for OpenSSL to link properly
2021-11-24 17:03:41 +01:00
Davide De Rosa 922ed26d73 Update API 2021-11-24 17:02:54 +01:00
Davide De Rosa 897af77b33 Update TunnelKit
- Keychain adjustments
- Revisited package dependencies
2021-11-23 16:54:41 +01:00
Davide De Rosa 7c00263e9a Pull latest API 2021-11-19 17:29:31 +01:00