summaryrefslogtreecommitdiff
path: root/src/se/leap/openvpn
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/openvpn')
-rw-r--r--src/se/leap/openvpn/ConfigParser.java6
-rw-r--r--src/se/leap/openvpn/OpenVpnService.java5
-rw-r--r--src/se/leap/openvpn/VpnProfile.java1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/se/leap/openvpn/ConfigParser.java b/src/se/leap/openvpn/ConfigParser.java
index 3d369fa6..36585d29 100644
--- a/src/se/leap/openvpn/ConfigParser.java
+++ b/src/se/leap/openvpn/ConfigParser.java
@@ -355,6 +355,12 @@ public class ConfigParser {
np.mServerName = remote.get(1);
}
}
+
+ // Parse remote config
+ Vector<String> location = getOption("location",1,2);
+ if(location != null && location.size() == 2){
+ np.mLocation = location.get(1).replace("__", ", ");
+ }
Vector<Vector<String>> dhcpoptions = getAllOption("dhcp-option", 2, 2);
if(dhcpoptions!=null) {
diff --git a/src/se/leap/openvpn/OpenVpnService.java b/src/se/leap/openvpn/OpenVpnService.java
index 620de204..1ef291df 100644
--- a/src/se/leap/openvpn/OpenVpnService.java
+++ b/src/se/leap/openvpn/OpenVpnService.java
@@ -350,12 +350,13 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
bconfig[4] = getString(R.string.routes_info, joinString(mRoutes));
bconfig[5] = getString(R.string.routes_info6, joinString(mRoutesv6));
- String session = mProfile.mName;
+ String session = mProfile.mLocation;
+ /* we don't want the IP address in the notification bar
if(mLocalIP!=null && mLocalIPv6!=null)
session = getString(R.string.session_ipv6string,session, mLocalIP, mLocalIPv6);
else if (mLocalIP !=null)
session= getString(R.string.session_ipv4string, session, mLocalIP);
-
+ */
builder.setSession(session);
diff --git a/src/se/leap/openvpn/VpnProfile.java b/src/se/leap/openvpn/VpnProfile.java
index 41cf574b..99e1c676 100644
--- a/src/se/leap/openvpn/VpnProfile.java
+++ b/src/se/leap/openvpn/VpnProfile.java
@@ -68,6 +68,7 @@ public class VpnProfile implements Serializable{
private UUID mUuid;
public int mAuthenticationType = TYPE_CERTIFICATES ;
public String mName;
+ public String mLocation;
public String mAlias;
public String mClientCertFilename;
public String mTLSAuthDirection="";