Commit Graph

807 Commits

Author SHA1 Message Date
Tobias Brunner 9486a2e5b0 ike-cfg: Pass arguments as struct 2019-04-25 14:31:33 +02:00
Tobias Brunner 8eafdc7f54 android: New release after fixing DB update and adding UTF-8 for EAP-MSCHAPv2 2019-04-16 15:58:31 +02:00
Tobias Brunner 199412a8ef android: Fix database upgrade from older versions 2019-04-16 15:08:23 +02:00
Tobias Brunner 398ea12cdb nm: Remove deprecated variables from autogen.sh 2019-03-14 13:42:08 +01:00
Tobias Brunner 3567bf60ac nm: Enable IPv6 tab in NM connection dialog 2019-03-14 13:42:08 +01:00
Tobias Brunner 7b9a8b3f75 android: New release after adding copy function and DNS server config 2019-03-08 17:08:11 +01:00
Tobias Brunner 2ef473be15 android: Use helper to parse IP addresses where appropriate 2019-03-05 19:02:05 +01:00
Tobias Brunner 7028e9d31e android: Add helper to parse IP addresses from strings
Using InetAddress.fromName() is not ideal as it might result in a DNS
resolution, which causes an exception if we do it from the main thread.
2019-03-05 18:56:09 +01:00
Tobias Brunner 8e7ad9ace8 android: Make DNS servers configurable in the GUI 2019-03-05 18:17:56 +01:00
Tobias Brunner 1a39c3d98d android: Import DNS servers 2019-03-05 17:45:48 +01:00
Tobias Brunner dd5de792cf android: Use configured custom DNS servers 2019-03-05 17:36:09 +01:00
Tobias Brunner dda8b891dc android: Add properties for DNS servers 2019-03-05 16:51:21 +01:00
Tobias Brunner 94cb3b4ddd android: Add menu option to copy a profile
Some users requests something like that to use different server IPs.
Interestingly, it's actually also possible to configure multiple
hostnames/IPs, separated by commas, as server address in the profile, which
are then tried one after another.

It's also useful when testing stuff to quickly compare the behavior with
some setting changed between two otherwise identical profiles.
2019-03-05 16:40:20 +01:00
Tobias Brunner da4e08909e android: Remove buildToolsVersion
Finally a default is configured and we don't have to update this
constantly.
2019-03-05 15:32:33 +01:00
Tobias Brunner 20fdb2d42b android: Update Gradle plugin 2019-03-05 15:32:33 +01:00
Tobias Brunner ecfe67550d signature-params: Provide option for maximum RSA/PSS salt length
However, the length now has to be resolved early, so we don't operate on
the negative constant values e.g. when generating the encoding.
2018-10-26 09:03:26 +02:00
Tobias Brunner 537764ea55 android: New release after fixing DNS leak and some bugs 2018-10-17 12:08:47 +02:00
Tobias Brunner 5442e8a161 android: Force the two line button to be focusable
On newer Android versions (8+) this does not seem to be necessary (adding
the onClick handler also sets "clickable" and that in turn seems to make
it focusable), however, for older releases it is (tested with 7.1.1
keyboard navigation just skips over the button).  This was seen on a
Fire TV stick.
2018-10-17 11:56:30 +02:00
Tobias Brunner 84ee9577e1 android: Avoid DNS leak due to blocking TUN device without DNS servers
It looks like Android 9 incorrectly continues to use the regular DNS
servers after the blocking TUN device is replaced with the actual
interface.  Setting DNS servers prevents that (since all traffic is
blocked, which ones doesn't really matter but local/loopback addresses
are rejected).
Interestingly, if the VPN server later does not assign any DNS servers, there
is no fallback to the non-VPN DNS servers for some reason (that's definitely
not as documented).  This could potentially be a problem as we don't
offer an option to configure DNS servers in the VPN profile.

Neither issue is seen on older Android versions (only tested on 7.1.1).
2018-10-17 11:56:30 +02:00
Tobias Brunner e89cfe4854 android: Update Gradle plugin 2018-10-17 11:56:30 +02:00
Tobias Brunner 9fb00bf89f android: Make sure we actually have a tile when updating it
Not sure when this happens exactly, in particular because the reported
stack traces look like this

java.lang.NullPointerException:
  at org.strongswan.android.ui.VpnTileService.updateTile (VpnTileService.java:220)
  at org.strongswan.android.ui.VpnTileService.onStartListening (VpnTileService.java:97)
  at android.service.quicksettings.TileService$H.handleMessage (TileService.java:407)

which violates the API documentation for getQsTile(), which states:

  This tile is only valid for updates between onStartListening() and
  onStopListening().

But apparently that's not always the case. There have been two reports
of such a crash, both on Android 8.0 and on Xiaomi Mi 5/6 devices, so
maybe it's a bug in that particular image.
2018-10-17 11:56:30 +02:00
Tobias Brunner 4bd4750131 android: Fix profile selection/edit when the device is rotated
The previous code lost track of the selected profile IDs, but the
widgets maintained their state (i.e. the list item was still selected and the
edit button still enabled).  Clicking the edit button then caused a crash when
trying to get the first item in the set.
2018-10-17 11:56:30 +02:00
Tobias Brunner 231c087e3c android: Disable capabilities in the android app
capset/capget are not in the NDK headers anymore, but we didn't use them
in the app anyway.
2018-09-21 11:01:26 +02:00
Tobias Brunner 7a6426082a android: Fix implementation of change_state() method in Android IMC
The signature was changed with 731e043c8e ("libimcv: Reset of IMC state for
new measurement cycle").
2018-09-21 10:55:34 +02:00
Tobias Brunner 948c42ab2e android: Properly set log file path 2018-09-12 11:44:57 +02:00
Tobias Brunner 4802a7477f android: New release after fixing EAP-PEAP issue and Autofill crash 2018-07-04 20:02:23 +02:00
Tobias Brunner ba9255b358 Revert "android: Enable the eap-ttls and eap-peap plugins"
This reverts commit 064c97afae.

We have to make this optional and more configurable.  It seems some
commercial VPN providers use self-signed certificates for their AAA
servers.
2018-07-04 19:36:50 +02:00
Tobias Brunner b2363b3678 android: Move hint from TextInputEditText to TextInputLayout
This avoids a NullPointerException on Android 8 related to the optional
Autofill functionality.  The bug has been fixed in Android 8.1 [1] but there
is no fix for Android 8.

[1] https://issuetracker.google.com/issues/67675432
2018-07-04 11:52:32 +02:00
Tobias Brunner 485d202adc android: Don't enforce the server address as AAA identity for EAP-PEAP/TTLS
This is similar to EAP-TLS.  We could probably make this configurable
later.
2018-07-04 11:52:23 +02:00
Tobias Brunner 07237f94e2 android: New release after fixing cancelling connecting on older systems 2018-07-03 15:44:36 +02:00
Tobias Brunner 4e905b96dd android: Poll dropper TUN device for data on older Android systems
It seems that even the NIO version of read() is uninterruptible on
platforms < Android 7 (24).
2018-07-03 15:35:29 +02:00
Tobias Brunner abb4a4c825 android: New version after adding lots of new features 2018-07-03 11:38:46 +02:00
Tobias Brunner 9e05f219fd android: Use ListView for log messages
This is hopefully a bit more efficient for large log files than the previous
single TextView.  The ListView widget also provides an auto-scroll mechanism.
2018-07-03 11:31:44 +02:00
Tobias Brunner 3f71118b08 android: Simplify error handling in VPN state fragment
Always reset the error state when disconnecting via state service. This
way the error state is also cleared when the connection is terminated
directly via control activity.
2018-07-03 11:31:44 +02:00
Tobias Brunner 00a9ff4085 android: Remove MIME type filter when importing trusted certificates
This way we should see files even if the MIME type has not been set
correctly while downloading it.
2018-07-03 11:31:44 +02:00
Tobias Brunner 27cf3e666e android: Show date/thread prefix in log view if we have enough space
This is the case for tablets or even phones in landscape orientation.
600dp is the breaking point for small tablets according to Google's
docs.
2018-07-03 11:31:44 +02:00
Tobias Brunner 19c95c9bc4 android: Change log message when initializing the native code and add a divider
We don't really start a daemon and the divider should make it easier to
identify retries.
2018-07-03 11:31:44 +02:00
Tobias Brunner ef0f0cc839 android: Don't use infinite keying tries on Android 5+
This way we get some feedback about the issue in the GUI (otherwise it
would just switch to connecting state) and also some delays between retries.
2018-07-03 11:31:43 +02:00
Tobias Brunner a2b3122865 android: Allow explicit termination of a profile without confirmation 2018-07-03 11:31:43 +02:00
Tobias Brunner baf2f47413 android: Handle restarts of the control Activity better
For instance, rotating a device will restart it and this previously
could have started the wrong profile or shown the system's VPN
confirmation dialog twice.
2018-07-03 11:31:43 +02:00
Tobias Brunner 4db3bf0cb0 android: Properly handle pressing home when VPN confirmation dialog is shown
As documented, onActivityResult() is called right before onResume() when
the activity is reactivated.  However, if the system's VPN confirmation
dialog is shown and the home button is pressed, the activity is stopped
and not just paused, so its state is saved.  And onActivityResult() is
actually also called before onStart().  This means that no fragment
transactions may be committed (i.e. no dialog may be shown) when the
activity is later restarted (e.g. because there is another attempt to
connect the VPN) until onStart() has been called.  So if we'd try to show
the error dialog in onActivityResult() after returning to the launcher
it would result in an IllegalStateException.

However, showing the dialog for the previous confirmation dialog is not
ideal anyway, so we just ignore that result.
2018-07-03 11:31:43 +02:00
Tobias Brunner b1b626a1e3 android: Crudely catch exception if no file browser is available
Seen on Android TV in the emulator.
2018-07-03 11:31:43 +02:00
Tobias Brunner 064c97afae android: Enable the eap-ttls and eap-peap plugins 2018-07-03 11:31:43 +02:00
Tobias Brunner 6f9b96acb4 android: Pass UUID to VPN service to initiate profiles 2018-07-03 11:31:42 +02:00
Tobias Brunner 163f752022 android: Remove Suite B ESP proposals and reorder some algorithms 2018-07-03 11:31:42 +02:00
Tobias Brunner 058fe95339 android: Make RSA/PSS flag configurable in the GUI 2018-07-03 11:31:42 +02:00
Tobias Brunner 079094df18 android: Import RSA/PSS flag 2018-07-03 11:31:42 +02:00
Tobias Brunner 205ec47ddb android: Add flag to enable RSA/PSS 2018-07-03 11:31:42 +02:00
Tobias Brunner ad2d20e5f0 android: Make fetching OCSP/CRL interruptible
This allows cancelling connecting if e.g. the OCSP server is not
reachable. Previously this caused some delay in disconnecting state but
even worse it cause an ANR if the user tried reconnecting during that
time as the main thread would get struck in setNextProfile() (we could
probably find a better solution there too in the future).
2018-07-03 11:31:41 +02:00
Tobias Brunner 8a09350f9f android: Make CRL/OCSP/strict flags configurable in the GUI 2018-07-03 11:31:41 +02:00