From 1a719174767e1050625d99c7b6e505867c943878 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 6 Oct 2021 21:43:53 +0200 Subject: Minor fixes --- main/src/main/java/de/blinkt/openvpn/VpnProfile.java | 4 ++-- main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 2 +- main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 2 +- main/src/main/res/values/strings.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java index af548740..2dbb1be8 100644 --- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -329,8 +329,8 @@ public class VpnProfile implements Serializable, Cloneable { if (mAllowAppVpnBypass) mBlockUnusedAddressFamilies = false; case 8: - if (!TextUtils.isEmpty(mCipher) && !mCipher.equals("AES-256-GCM") && !mCipher.equals("AES-128-GCM")) { - mDataCiphers = "AES-256-GCM:AES-128-GCM:" + mCipher; + if (!TextUtils.isEmpty(mCipher) && !mCipher.equals("AES-256-GCM") && !mCipher.equals("AES-128-GCM") && !mCipher.equals("CHACHA20-POLY1305")) { + mDataCiphers = "AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:" + mCipher; } case 9: if (!TextUtils.isEmpty(mDataCiphers) && diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 49ae56bb..cb78784c 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -717,7 +717,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } if (mDeviceStateReceiver != null) { - this.unregisterReceiver(mDeviceStateReceiver); + unregisterDeviceStateReceiver(); } // Just in case unregister for state VpnStatus.removeStateListener(this); diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index ef39540a..e325f8b7 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -134,7 +134,7 @@ public class VpnStatus { mLogFileHandler.sendEmptyMessage(LogFileHandler.FLUSH_TO_DISK); } - public static void setConnectedVPNProfile(String uuid) { + public synchronized static void setConnectedVPNProfile(String uuid) { mLastConnectedVPNUUID = uuid; for (StateListener sl: stateListener) sl.setConnectedVPN(uuid); diff --git a/main/src/main/res/values/strings.xml b/main/src/main/res/values/strings.xml index 01b1842e..3b84f418 100755 --- a/main/src/main/res/values/strings.xml +++ b/main/src/main/res/values/strings.xml @@ -126,7 +126,7 @@ Your image does not support the VPNService API, sorry :( Encryption Enter data encryption methods - Enter the data encryption cipher algorithms used by OpenVPN separated by : (--data-ciphers). Leave empty to use the default of AES-256-GCM:AES-128-GCM. + Enter the data encryption cipher algorithms used by OpenVPN separated by : (--data-ciphers). Leave empty to use the default of AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305. Enter the authentication digest used for OpenVPN. Leave empty to use default digest. Authentication/Encryption File Explorer -- cgit v1.2.3