Commit Graph

3125 Commits

Author SHA1 Message Date
Davide
09e8055b7d
Expand on logs generated by ErrorHandler
An error alert is being presented to the user.

Fixes #1098
2025-01-23 11:04:37 +01:00
Davide
60e3460966
OpenVPN: Fix potential deadlock on disconnection (#1097)
NE link writes are blocking and don't support timeout. When shutting
down a UDP session, the OCCPacket may fail to send and lock the session
in a stale state ("Active" but dead), with an infinite loop of "Failed
TUN read" messages in the log.

- First, [add cancellation handlers to NE UDP/TCP
sockets](https://github.com/passepartoutvpn/passepartoutkit-source/pull/464)
- Then, rather than writing the exit packet in the foreground and
scheduling cancellation:
  - Write the packet in a background task
  - Wait until timeout in the actor
  - Cancel the pending write and go ahead

This may still leak if NE socket cancellation doesn't work, but will
prevent deadlock.
2025-01-23 10:22:11 +01:00
Davide
f3d90a9a93
Present donations in reverse order
:-)
2025-01-22 23:11:28 +01:00
Davide
cd76c39102
Bump version 2025-01-22 22:35:37 +01:00
Davide
a13cc3474c
OpenVPN: Restore and improve negotiation speed (#1095)
The new OpenVPN parser was painfully slow due to allocating
NSRegularExpression zillion times, which resulted in poor performance
(4x time!) when processing long PUSH_REPLY messages. This is a hard
regression from v2 because [TunnelKit created the regexes
statically](339b509ddf/Sources/TunnelKitOpenVPNCore/ConfigurationParser.swift (L42)).

Solution: pre-allocate the regular expressions at parser creation time.

Optimize long fragmented replies further by catching PUSH_REPLY
continuations early, rather than parsing line by line.
2025-01-22 22:33:39 +01:00
Davide
8ab7b0d143
OpenVPN: Resolve issues with long negotiations (#1094)
Clean up the naive abuse of async/await in OpenVPNSession. Encapsulate
the instances of ControlChannel/DataChannel inside the Negotiator actor,
so that actor-isolation for them becomes automatically unnecessary.
Synchronous methods inside the actor are the way to go.

After that, handle control packets in orderly fashion, because this is
not being done and may spoil negotiation very easily. Probably also
happening in TunnelKit.

Ultimately, skip some unnecessary XOR processing in UDP when no XOR
method is actually set.
2025-01-22 22:33:29 +01:00
Davide
f76b1e26ba
Bump version/build 2025-01-22 18:18:42 +01:00
Davide
23dc416eb7
Bump version 2025-01-20 21:38:20 +01:00
Davide
a3281042f8
Fix iCloud/TV sync not working with Advanced Data Protection (#1090)
The ubiquity token does not seem to be a reliable source of truth for
the state of CloudKit. Faced with tvOS, now also with Advanced Data
Protection. It is nil, but CloudKit actually works.

Therefore, start a CloudKit container regardless of the ubiquity token.

The only downside is that the iCloud/TV icons of a profile will now only
appear crossed in case of in-app ineligibility, but this is in favor of
better functionality.
2025-01-20 21:37:26 +01:00
Davide
b2fde2327a
Skip CHANGELOG attachment in release 2025-01-20 16:23:58 +01:00
Davide
70c4b3ef7d
Bump version 2025-01-20 14:51:36 +01:00
Davide
1414080ea9
Do not require purchase for empty on-demand rules (#1089)
Major issue with migrated profiles with the "Excluding" policy. Existing
users are being opted into an unnecessary purchase.
2025-01-20 14:49:47 +01:00
Davide
bb49ccaffb
Bump version 2025-01-20 11:33:30 +01:00
Davide
8514bf24f2
OpenVPN: Default gateway not set properly in some cases (#1087)
Regression from TunnelKit, the parser was not handling multiple
redirect-gateway directives correctly.
2025-01-20 11:32:26 +01:00
Davide
7ecd37e6ba
Fix purchased features on Apple TV (#1083)
Refactor #1074 to show the appropriate list of eligible features in the
"Purchased" screen. The "X" signs are highly misleading.
2025-01-19 23:09:55 +01:00
Davide
66da9d165d
Omit broken links from TV paywall
Fixes #1068
2025-01-19 22:48:38 +01:00
Davide
b5b471a995
Depend on online package in framework manifest 2025-01-19 22:14:37 +01:00
Davide
55156598ef
Update some TODOs 2025-01-19 22:05:22 +01:00
Davide
afd6263460
Bump version 2025-01-19 12:36:37 +01:00
Davide
37e15016e4
Drop erroneous imports from OpenVPN/OpenSSL 2025-01-19 12:10:49 +01:00
Davide
c73b84c1fa
Redact resolved endpoints from logs 2025-01-19 12:09:36 +01:00
Davide
524243ebaa
Fix error alert when importing files from external apps (#1078)
URL.startAccessingSecurityScopedResource() fails in that case, but
permission is not required at all.

Could reproduce by importing .ovpn file from a Telegram chat.
2025-01-19 11:59:20 +01:00
Davide
54c66f48b5
Fix unused SecureRandom() value 2025-01-19 09:47:21 +01:00
Davide
b4d77a6443
Update 2025-01-19 00:45:59 +01:00
Davide
bd9f8d63a5
Improve debug logs and move methods to library (#1076)
- Move availableLogs() / purgeLogs() to library
- Append and rotate logs by size (500k)
- Add marker between app/tunnel launches
- Purge logs on each save (3 days)
- Unify debug log content view across platforms
    - macOS: Table + inspect full line
    - iOS/tvOS: Use List
    - Scroll to bottom onLoad()
2025-01-19 00:42:58 +01:00
Davide
a6e44872e9
Select country by typing on macOS
Fixes #1062
2025-01-19 00:18:12 +01:00
Davide
0f7530645c
Bump version 2025-01-18 18:15:20 +01:00
Davide
8972d9773e
Resolve several issues in bump script/lane (#1075)
- Simplify build/version updates by moving MARKETING_VERSION and
CURRENT_PROJECT_VERSION to Config.xcconfig
- Provide Ruby (for fastlane) and Bash (for CI) versions of
xconfig-get/set
- Copy release notes atomically inside the lane to guarantee they are
included in the version commit
- Add -nt to skip the build tag
2025-01-18 18:13:54 +01:00
Davide
72c4a11c5e
Bump version 2025-01-18 16:06:51 +01:00
Davide
8092c4fb1d
Assume .appleTV to be enough on tvOS (#1074)
Eligibility is ensured on iOS/macOS "remote" apps and profiles are not editable on TV. The day they can be edited, this will need a rework, but today it should be fine.

Regression due to BuildProducts not being credited on Apple TV.
2025-01-18 15:46:11 +01:00
Davide
d42b336908
Bump version 2025-01-18 14:02:59 +01:00
Davide
72d23cbd06
Do not fall back to AES-128-CBC when PUSH_REPLY has no cipher (#1073)
https://github.com/passepartoutvpn/passepartoutkit-source/pull/461
2025-01-18 13:57:10 +01:00
Davide
185dcf2887
Fix release job 2025-01-18 11:30:12 +01:00
Davide
59f4516e2e
Bump version 2025-01-18 11:04:30 +01:00
Davide
db7e6ae73f
Fix submodule 2025-01-18 11:04:16 +01:00
Davide
037ff19fd7
Bump version 2025-01-18 10:57:39 +01:00
Davide
2fdab4db77
Fix template 2025-01-15 22:41:04 +01:00
Davide
4cae181bc8
Verify tunnel profile every hour
10 minutes is too pedantic in logs.
2025-01-15 20:50:41 +01:00
Davide
c387b8ddfd
Fix metadata as per App Review (#1061)
- Add links to EULA and privacy policy in the app description
- Update copyright in metadata
2025-01-15 20:48:47 +01:00
Davide
4e43c14cc6
Update copyright 2025-01-15 20:22:52 +01:00
Davide
e41ac446c6
Rename submodule to PassepartoutKit-Source 2025-01-15 15:22:18 +01:00
Davide
f8e0def072
Drop .git suffix from README 2025-01-15 10:56:37 +01:00
Davide
ae7a88ff95
Delete Demo
Moved to https://github.com/passepartoutvpn/passepartoutkit
2025-01-15 10:55:05 +01:00
Davide
e87128e5b4
Retain WireGuardAdapterDelegate (#1064)
The delegate was lost due to not being retained anywhere, and the
WireGuard adapter was therefore not finalizing the connection (i.e. set
tunnel settings).

Regression in #1057
2025-01-15 10:45:17 +01:00
Davide
849234889b
Update submodule 2025-01-15 09:41:43 +01:00
Davide
7b8dbfe84a
Minimize dependencies of VPN implementations (#1057)
### OpenVPN

- Make CPassepartoutCryptoOpenSSL agnostic of PassepartoutKit
- Move Allocation/ZeroingData from PassepartoutKit to package for
internal use
  - Rename ZeroingData.count to .length for consistency with NSData
  - Duplicate some Data manipulation code in CryptoOpenSSL
- Retain a simplified version of ZeroingData in PassepartoutKit
(AutoerasingData)

### WireGuard

- Make WireGuardKit imports `internal`
2025-01-15 09:39:58 +01:00
Davide
53ee7ba457
Bump version 2025-01-13 23:14:56 +01:00
Davide
07b46da553
Fix regression in profile disconnection 2025-01-13 23:14:19 +01:00
Davide
f1d13dc6e8
Bump version 2025-01-13 18:22:12 +01:00
Davide
4a236787bc
Add EULA and privacy policy in paywall (#1056)
Follow-up from App Review.
2025-01-13 18:21:33 +01:00