summaryrefslogtreecommitdiff
path: root/app/src/main/java/de
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java1
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java14
2 files changed, 15 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index 9ed2054e..ae38a59b 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -377,6 +377,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
// connections[n], n>0 gets choosen?
Connection connection = mProfile.mConnections[0];
+ VpnStatus.setCurrentlyConnectingProfile(mProfile);
VpnStatus.logInfo(R.string.building_configration);
VpnStatus.updateStateString("VPN_GENERATE_CONFIG", "", R.string.building_configration, ConnectionStatus.LEVEL_START);
diff --git a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
index 8007f7c5..4fa5a7b6 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -48,6 +48,7 @@ public class VpnStatus {
final static java.lang.Object readFileLock = new Object();
private static VpnProfile lastConnectedProfile;
+ private static VpnProfile currentlyConnectingProfile;
public static TrafficHistory trafficHistory;
@@ -170,6 +171,15 @@ public class VpnStatus {
}
+ public static void setCurrentlyConnectingProfile(VpnProfile connectingProfile) {
+ currentlyConnectingProfile = connectingProfile;
+ }
+
+ public static String getCurrentlyConnectingVpnName() {
+ return currentlyConnectingProfile != null ? currentlyConnectingProfile.mName : null;
+ }
+
+
public static String getLastConnectedVpnName() {
return lastConnectedProfile != null ? lastConnectedProfile.mName : null;
}
@@ -531,4 +541,8 @@ public class VpnStatus {
public static boolean isAlwaysOn() {
return isAlwaysOnBooting.get();
}
+
+ public static boolean isUsingBridges() {
+ return lastConnectedProfile != null && lastConnectedProfile.mUsePluggableTransports;
+ }
}