Commit Graph
1049 Commits
Author SHA1 Message Date
Tobias Brunner 651a5b0ded android: Only select default ABIs when building OpenSSL
This skips the experimental RISC-V ABI in newer NDKs.
2025-04-14 11:54:42 +02:00
Tobias Brunner 09edb565ba android: Skip unknown ABIs when building OpenSSL
Newer NDKs have RISC-V as experimental ABI (not enabled by default, see
next commit).  If we don't have a mapping for a specific target, OpenSSL
falls back to 'android-arm', so that won't really work (interestingly,
it does build).
2025-04-14 11:54:42 +02:00
Tobias Brunner 0f1f375a21 android: Protect but don't keep track of sockets used for source address lookups
These sockets are closed immediately again, so no need to re-protect them
during roaming events.

References strongswan/strongswan#1691

Fixes: 6d87a86510 ("android: Use new sockets to determine source IP")
2025-04-14 11:54:42 +02:00
Tobias Brunner 77f99df656 android: Remove special handling of legacy Android versions in native code
Since minSdkVersion has been 21 for a while, we can remove some code
that was necessary for older versions.
2025-04-14 11:54:42 +02:00
Tobias Brunner 8036b3f932 android: New release after fixing Always-on VPN with managed profiles 2025-04-03 16:35:47 +02:00
Tobias Brunner d87be9b981 android: Fix starting a managed profile as Always-on VPN
The callbacks provided via ProcessLifecycleOwner are only triggered when
Activities are started.  However, when Android triggers the Always-on
VPN it directly starts our VpnService subclass, no Activity.  So the
configs were not loaded and the VPN couldn't be initiated with a managed
profile.  This ensures the config is loaded right from the start of
the app.  And by registering for modifications in onCreate() we can also
use the correct config if the app is never started in-between changes to
the managed profiles and triggering the Always-on VPN.
2025-04-03 16:19:53 +02:00
Tobias Brunner d5d2568ff0 callback-job: Replace return_false() in constructors with dedicated function
Besides being clearer, this fixes issues with GCC 15.  The latter uses
C23 by default, which changes the meaning of function declarations
without parameters such as

	bool return false();

Instead of "this function takes an unknown number of arguments", this
now equals (void), that is, "this function takes no arguments".  So we
run into incompatible pointer type warnings all over when using such
functions.  They could be cast to (void*) but this seems the cleaner
solution for this use case.
2025-03-19 10:22:37 +01:00
Tobias Brunner 25ec2bc43d Don't reference 5.9 in URLs to docs.strongswan.org 2025-03-11 10:26:31 +01:00
Tobias Brunner 378c75cb2e nm: Version bump to 1.6.2 2025-03-11 09:57:54 +01:00
Tobias Brunner 511add2111 Fixed some typos, courtesy of codespell 2025-03-04 13:43:31 +01:00
Tobias Brunner a299a4d3ce android: New release after fixing reauthentication regression 2025-02-25 15:21:56 +01:00
Tobias Brunner 40a37b6ffc android: Disable make-before-break reauthentication
The service implementation with its handling of reauth callbacks and
no-DNS TUN device etc. can't handle make-before-break reauthentication
at the moment.
2025-02-25 14:57:00 +01:00
Tobias Brunner e4d6bcef48 android: Move annotation to method where startActivityAndCollapse() is called
Fixes: 5237bf3a5c ("android: Suppress deprecation warning because of startActivityAndCollapse()")
2025-02-20 11:59:55 +01:00
Tobias Brunner f0f986c55d android: New release after adding support for passwords in managed configs and profile files
Also fixes some bugs and deprecation warnings.
2025-02-18 14:19:40 +01:00
Tobias Brunner a47e282d09 android: Imported VPN profile files may contain passwords
A warning is displayed to the users, reminding them that there is a
cleartext password in the file.
2025-02-18 14:12:43 +01:00
Tobias Brunner 0b6d42661d android: Consistently use *Start/End in layouts and remove redundant old settings 2025-02-18 14:12:43 +01:00
Tobias Brunner b021406f6b android: Suppress deprecation warning because of stopForeground() 2025-02-18 14:12:43 +01:00
Tobias Brunner 5237bf3a5c android: Suppress deprecation warning because of startActivityAndCollapse() 2025-02-18 14:12:43 +01:00
Tobias Brunner 4e2c88f7ed android: Handle deprecated getParcelable* and getSerializable methods 2025-02-18 14:12:43 +01:00
Tobias Brunner 288bd41aca android: Suppress warning in implementation only used for Android < 33 2025-02-18 14:12:43 +01:00
Tobias Brunner 26eef1f095 android: Replace deprecated onBackPressed() and enable predictive back gestures
Doesn't really make a difference it seems.
2025-02-18 14:12:43 +01:00
Tobias Brunner 9a92088bb4 android: Replace deprecated fragment menu APIs 2025-02-18 14:12:43 +01:00
Tobias Brunner 10d8b66f05 android: Ignore empty strings for settings in managed profiles
Unspecified settings should be set to null, while some MDMs might send
them as empty strings, which could cause issues (like an empty password
or trying to parse an empty DNS server address).
2025-02-18 14:12:43 +01:00
Tobias Brunner 4f808cb2b0 android: Allow setting the password in managed profiles
To avoid complicated changes in the UI, users can still update it.  But
the default, if they clear the field, will be the managed password.
2025-02-18 14:12:43 +01:00
Tobias Brunner 87610799f2 android: Properly deinit library if parsing an IP fails
This can happen with empty strings, which might be set for managed
profiles, which caused the refcounting to be askew and the resolver not
to work after connecting once because it was flushed and disabled.
2025-02-18 14:12:43 +01:00
Tobias Brunner ff2010c8da android: Update NDK version and enable support for 16KiB page tables 2025-02-18 14:12:43 +01:00
Tobias Brunner e6b040265d android: Fix updating password for managed profiles
Without data source set on the profile, this caused the app to crash
with a null pointer dereference when it is updated.
2025-02-18 14:12:43 +01:00
Tobias Brunner 4e634f4511 nm: Add German translation for traffic selector fields 2025-02-07 12:01:00 +01:00
Jiří Matěják 418ef2a7a1 nm: Expose local-ts
Signed-off-by: Jiří Matěják <matejak@merica.cz>
2025-02-06 21:01:50 +01:00
Jiří Matěják d0dd7b561b nm: Expose remote-ts
Signed-off-by: Jiří Matěják <matejak@merica.cz>
2025-02-06 21:00:48 +01:00
Tobias Brunner c6ca688441 nm: Version bump to 1.6.1 2024-12-03 14:37:26 +01:00
Tobias Brunner 5019e3ece0 nm: Update build files and switch from intltool to gettext
gnome-common has been deprecated, so has intltool.  This follows GNOME's
recommended migration paths.
2024-10-16 08:16:43 +02:00
Tobias Brunner 9b9cf2001f android: Fix import of an already existing VPN profile 2024-08-07 08:58:12 +02:00
Tobias Brunner fe1c9dedb7 android: New release after updating target SDK and fixing some compatibility issues 2024-08-06 18:01:54 +02:00
Tobias Brunner 6064209872 android: Increase targetSdkVersion to 34 (Android 14) 2024-08-06 18:01:54 +02:00
Tobias Brunner 880e273985 android: Avoid using deprecated ViewCompat methods 2024-08-06 18:01:54 +02:00
Tobias Brunner 01c81ca15f android: Replace deprecated Observer/Observable with PropertyChangeListener etc.
Kinda misusing the interface as there is no specific property, but
otherwise seems like a 1:1 replacement.
2024-08-06 18:01:54 +02:00
Tobias Brunner 51f746161d android: Add workaround for a bug preventing background service starts from TileService
When targeting Android 14, we get a "Background activity launch blocked!"
exception when trying to start the connection in the background (closing
the drawer works).  Which is apparently a bug:

  https://issuetracker.google.com/issues/305035828

The workaround here is kinda ugly.  In particular, because it's not
possible anymore since a few versions to open a dialog that allows users
to directly grant the required permission to the app.  We can only open
the generic settings dialog where users have to search for the app and
grant the permission themselves (we could add a dialog with an explanation
similar to the one for the power whitelist if necessary).  Hopefully this
gets fixed at some point (the current beta of Android 15 still has the
same bug, though).
2024-08-06 18:01:54 +02:00
Tobias Brunner 3286f75ffe android: Use PendingIntent-version of startActivityAndCollapse()
The other version has been deprecated and throws an exception when
targeting Android 14+.
2024-08-06 18:01:54 +02:00
Tobias Brunner 38160c5cb7 android: Explicitly mark receiver as not exported during registration 2024-08-06 18:01:54 +02:00
Tobias Brunner 9c4ceced1c android: Declare foreground service type for VpnService instance
Required for Android 14 (34).  Since no other type fits we use specialUse,
which also requires a new permission and a description for why we use it.
2024-08-06 18:01:54 +02:00
Tobias Brunner 4f2e65f3d0 android: Fix label for name field in managed profiles
The field is not actually optional.
2024-08-06 18:01:54 +02:00
Tobias Brunner 81041b55d2 android: Fix crash when opening list of apps for new profiles
Fixes: 150dc5ab64 ("android: Make selected apps read-only")
2024-08-06 18:01:54 +02:00
Tobias Brunner 8a14c20ec7 android: Update dependencies 2024-08-06 18:01:54 +02:00
Tobias Brunner 7b78e35ff6 android: Update Gradle plugin 2024-08-06 18:01:54 +02:00
Tobias Brunner b21178b43c android: New release after adding fix for existing shortcuts/Intents 2024-02-26 11:14:14 +01:00
Tobias Brunner 45371da846 android: Add fallback for the old name of the profile ID extra
This fixes existing shortcuts and automation via Intents.

Fixes: 8e3b921abe ("android: Always use UUID to access profiles")
2024-02-26 11:01:55 +01:00
Tobias Brunner 7db629e4bc android: New release after adding support for managed configurations 2024-02-21 12:24:53 +01:00
Tobias Brunner 51a5d96b36 android: Add translations for managed configuration strings
Not actually translating anything, but making the linter happy.
2024-02-21 12:24:53 +01:00
Markus Pfeiffer 8c6b3019a7 android: Update managed certificates if config changes 2024-02-21 12:24:53 +01:00