From 5ac110f5963a7118f953bf264cf5bf9abed303b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 12 Nov 2013 19:56:37 +0100 Subject: Trivial changes in strings.xml --- res/values/strings.xml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index b4839763..9885952f 100755 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2,7 +2,7 @@ - Bitmask for Android + Bitmask Bitmask Server Address: Server Port: @@ -21,7 +21,7 @@ You must select a certificate Source code and issue tracker available at https://github.com/leapcode/bitmask_android/ This program uses the following components; see the source code for full details on the licenses - About + About LEAP Switch provider About Bitmask for Android List of all configured VPNs @@ -257,7 +257,7 @@ Authentication failed Waiting for usable network Settings - Bitmask Dashboard + Bitmask Provider: No provider configured Access EIP connection settings @@ -268,13 +268,11 @@ Connection will be secure using your own certificate. Connection secure using your own certificate. Encrypted Internet - Configure Bitmask - Provider list fragment - Top padding - Select new Provider - Introduce new provider + Select a service provider + Add new Provider + Add a new service provider Save - New provider\'s main URL + Domain name It seems your URL is well formed It seems your URL is not well formed Provider details @@ -286,8 +284,7 @@ Please enter your username password User message - Try again: server math error. - Not valid username and/or password. + Incorrect username or password. It should have at least 8 characters. Try again: Client HTTP error Try again: I/O error @@ -295,7 +292,7 @@ Update the app Log In Log Out - Trust completely + Skip security check Configuration Error Configure Exit @@ -314,10 +311,10 @@ This is not a trusted Bitmask provider. Configuring provider Authenticating - Authenticating with entered login and password. + Logging in Log out Logging out from this session. - Your password is not well-formed: it should have at least 8 characters. + Invalid password: must be at least 8 characters. Authentication succeeded. Authentication failed. Logged out. -- cgit v1.2.3 From 18f7612ee584e6f3023d230698ab0bf8866cd2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 12 Nov 2013 20:36:26 +0100 Subject: In notification: s/hippo.bitmask.net/bitmask.net/ --- src/se/leap/openvpn/OpenVpnService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/se/leap/openvpn/OpenVpnService.java b/src/se/leap/openvpn/OpenVpnService.java index 620de204..5e5bf3d7 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.mName.substring(mProfile.mName.indexOf(".")+1); + /* 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); -- cgit v1.2.3 From f9f69298e7d0b5e4258ea27095f50f9da7c6ff9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 21 Nov 2013 21:41:58 +0100 Subject: OpenVPN notification contains location. Instead of plain domain, we're printing a new variable stored in vpnprofile (parsed in ConfigParser): location. I'm substituing "__" by ", ", but I'm not uppercasing anything. We rely on the raw data from eip-service.json. --- res/values/strings.xml | 2 ++ src/se/leap/bitmaskclient/EIP.java | 15 ++++++++++++++- src/se/leap/openvpn/ConfigParser.java | 6 ++++++ src/se/leap/openvpn/OpenVpnService.java | 2 +- src/se/leap/openvpn/VpnProfile.java | 1 + 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 9885952f..2598d452 100755 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -269,6 +269,7 @@ Connection secure using your own certificate. Encrypted Internet Select a service provider + Top padding Add new Provider Add a new service provider Save @@ -284,6 +285,7 @@ Please enter your username password User message + Try again: server math error. Incorrect username or password. It should have at least 8 characters. Try again: Client HTTP error diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java index f9384ff6..22f7558d 100644 --- a/src/se/leap/bitmaskclient/EIP.java +++ b/src/se/leap/bitmaskclient/EIP.java @@ -431,6 +431,7 @@ public final class EIP extends IntentService { String ports = "ports"; String protos = "protocols"; String capabilities = "capabilities"; + String location = "location"; Vector arg = new Vector(); Vector> args = new Vector>(); @@ -457,7 +458,7 @@ public final class EIP extends IntentService { } try { - arg.add("remote"); + arg.add(remote); arg.add(mGateway.getString(remote)); } catch (JSONException e) { // TODO Auto-generated catch block @@ -467,7 +468,19 @@ public final class EIP extends IntentService { options.put("remote", (Vector>) args.clone() ); arg.clear(); args.clear(); + + try { + arg.add(location); + arg.add(mGateway.getString(location)); + } catch (JSONException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + args.add((Vector) arg.clone()); + options.put("location", (Vector>) args.clone() ); + arg.clear(); + args.clear(); JSONArray protocolsJSON = null; arg.add("proto"); try { 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 location = getOption("location",1,2); + if(location != null && location.size() == 2){ + np.mLocation = location.get(1).replace("__", ", "); + } Vector> 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 5e5bf3d7..1ef291df 100644 --- a/src/se/leap/openvpn/OpenVpnService.java +++ b/src/se/leap/openvpn/OpenVpnService.java @@ -350,7 +350,7 @@ 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.substring(mProfile.mName.indexOf(".")+1); + 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); 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=""; -- cgit v1.2.3