Commit Graph

26 Commits

Author SHA1 Message Date
Davide De Rosa 64d1131fdd
Update copyright
Closes #473
2024-01-14 14:36:55 +01:00
Davide De Rosa d0cd953031
Drop deprecated .disconnectsIfNotMatching (#472)
Unused since trusted networks was converted to on-demand.
2024-01-14 14:20:39 +01:00
Davide De Rosa 0299466a8f
Unintended sensitive data in issue reports (#471) 2024-01-14 14:01:54 +01:00
Davide De Rosa 990fde5325
On-demand not applying to wired connections (#463)
Condition is `#if os(macOS)`, but a Catalyst app is actually `os(iOS)`,
so the code adding the Ethernet rule was being ignored.
2024-01-11 00:15:06 +01:00
Davide De Rosa 5c5697762b
Add minimal TV app
Closes #315
2023-12-31 01:21:38 +01:00
Davide De Rosa a0da930d98
Refactor and test ProductManager (#437)
Carefully drop the StoreKit and Kvitto dependencies for ProductManager
to be testable.

Rebuild test target completely to start writing meaningful tests in
general.
2023-12-20 20:43:39 +01:00
Davide De Rosa 38b06b6bb5
Encrypt profiles stored to iCloud (#436)
Going forward, persist profiles encrypted to the CloudKit container.
Conversely, read from the encrypted field if any, falling back to the
plain JSON field.

WARNING: the change is NOT backward compatible, as it would defeat the
purpose. That is, once the profile is stored encrypted, the old plain
profile is erased and its content won't be readable by older versions of
the app.
2023-12-17 23:31:08 +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 12c08c132c
Update metadata and translations (#365) 2023-10-10 23:00:19 +02:00
Davide De Rosa 7de000148f
Level up to strict Concurrency (#361)
Trigger and resolve some additional Concurrency issues.
2023-09-10 20:36:52 +02:00
Davide De Rosa 0872c27fce
Move CloudKit logic to PersistenceManager (#355)
Observe updates rather than execute operations imperatively. Also refine
responsibilities of AppContext and CoreContext.
2023-09-10 10:34:42 +02:00
Davide De Rosa 791b6be7d5
Allow erasing remote iCloud store (#351)
Convenient for those with privacy concerns.
2023-09-09 21:52:32 +02:00
Davide De Rosa a4ca8cc996
Support iCloud sync as an option (#350)
Sync will be enabled on upgrade for consistency with current behavior,
and disabled for new installs.

Fixes #227
2023-09-09 20:29:04 +02:00
Davide De Rosa a3cfde1950
Drop v2 migrations (#348) 2023-09-08 22:18:41 +02:00
Davide De Rosa 0f84859354
Do some housekeeping (#347)
- Be consistent with on-demand rules
- Use shortcut reduce(into:)
2023-09-08 16:20:42 +02:00
Davide De Rosa b4b2db176c
Fix .sink retain cycles (#345) 2023-09-08 16:20:01 +02:00
Davide De Rosa 4102894160
Always read profiles from fetched value (#340)
There may be a mismatch between profiles and profile headers. For
example, some profiles may appear in the main list, but the same ones
may not appear in the existing profile names when adding a new profile
(and vice versa). That's because they are being fetched from different
sources. Unify that.
2023-08-05 22:41:58 +02:00
Davide De Rosa c8abb245f3
Restore on-demand backward compatibility (#338)
In #333, the non-optional field `disconnectsIfNotMatching` was removed
completely. Therefore, downgrading from 2.2.0 may lose profiles due to
the missing required field.

Mitigate the issue by restoring the field as optional, even if it's
unused, for the sake of not breaking profile serialization until the
2.2.0 release. Remove the deprecated field after that.
2023-07-30 17:43:03 +02:00
Davide De Rosa e0dbca224f
Rework "Trusted networks" to be a generic "On-demand" (#333)
Extend the feature by also providing a complementary "include" policy,
i.e. activate the VPN _only_ on the specified networks. "Trusted
networks" was only providing the "exclude" counterpart, i.e. _except_
the specified networks.

Closes #119
2023-07-23 08:44:46 +02:00
Davide De Rosa 33af87206a
Throw error on reinstate()/connect() (#328)
Errors here were just being ignored, thus preventing error alert from
appearing.
2023-07-06 19:45:43 +02:00
Davide De Rosa 278efaf347
Refactor domain errors (#310) 2023-07-02 12:51:50 +02:00
Davide De Rosa fb47def4ed
Avoid inline format for non-descriptive strings (#302) 2023-05-28 11:57:35 +02:00
Davide De Rosa 3a59ac7684
Invoke VPNManager methods with a Profile object (#309)
The VPNConfiguration parameter is opaque and tightly coupled to
TunnelKit. Connecting to a Profile makes infinitely more sense, beyond
simplifying the VPNManager class. Configuration building is fully
delegated to the strategy (as it has to be).

- VPNManager takes Profile and produces VPNConfigurationParameters
- VPNManagerStrategy takes VPNConfigurationParameters (abstract)
- TunnelKitVPNManagerStrategy takes VPNConfigurationParameters and
produces TunnelKitVPNConfiguration internally
2023-05-28 09:56:51 +02:00
Davide De Rosa a78a7b18b5
Encapsulate *Persistence responsibilities (#305)
Do not leave the choice of a repository context up to the library
consumer. Instead, provide a specific factory (*Persistence) for each
module.
2023-05-27 12:32:53 +02:00
Davide De Rosa efcda495bc
Address logging issues (#304)
* Make specific message levels a default extension

* Define Loggable protocol

* Keep track of message originator metadata

* Fix tracing of Core Data logs

* Log query on entity not found
2023-05-27 12:14:04 +02:00
Davide De Rosa 7ccb10febc
Rethink library architecture (#301) 2023-05-24 18:19:47 +02:00