summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <richy@cyborgsociety.org>2013-11-30 01:47:29 +0100
committercyBerta <richy@cyborgsociety.org>2013-11-30 01:47:29 +0100
commit7b95df801bb5db47cce68814b7fc5a472d92c196 (patch)
tree2a5add2db43bb4ca1a9e4977dc878aaa17a3e57a
parent8462f8a65eacbc47d8e63db058584bed0898e279 (diff)
parentf9f69298e7d0b5e4258ea27095f50f9da7c6ff9b (diff)
Merge branch 'feature/clearer-wording' of https://github.com/parmegv/bitmask_android into feature/clearer_wording
-rwxr-xr-xres/values/strings.xml25
-rw-r--r--src/se/leap/bitmaskclient/EIP.java15
-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
5 files changed, 36 insertions, 16 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b4839763..2598d452 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2,7 +2,7 @@
<!-- Generated by crowdin.net -->
<resources>
- <string name="app">Bitmask for Android</string>
+ <string name="app">Bitmask</string>
<string name="app_name">Bitmask</string>
<string name="address">Server Address:</string>
<string name="port">Server Port:</string>
@@ -21,7 +21,7 @@
<string name="no_certificate">You must select a certificate</string>
<string name="repository_url_text">Source code and issue tracker available at https://github.com/leapcode/bitmask_android/</string>
<string name="copyright_others">This program uses the following components; see the source code for full details on the licenses</string>
- <string name="about">About</string>
+ <string name="about">About LEAP</string>
<string name="switch_provider_menu_option">Switch provider</string>
<string name="about_summary">About Bitmask for Android</string>
<string name="vpn_list_summary">List of all configured VPNs</string>
@@ -257,7 +257,7 @@
<string name="state_auth_failed">Authentication failed</string>
<string name="state_nonetwork">Waiting for usable network</string>
<string name="menu_settings">Settings</string>
- <string name="title_activity_dashboard">Bitmask Dashboard</string>
+ <string name="title_activity_dashboard">Bitmask</string>
<string name="provider_label">Provider:</string>
<string name="provider_label_none">No provider configured</string>
<string name="eip_settings_button_description">Access EIP connection settings</string>
@@ -268,13 +268,12 @@
<string name="future_authed_secured_status">Connection will be secure using your own certificate.</string>
<string name="authed_secured_status">Connection secure using your own certificate.</string>
<string name="eip_service_label">Encrypted Internet</string>
- <string name="title_activity_configuration_wizard">Configure Bitmask</string>
- <string name="provider_list_fragment_tag">Provider list fragment</string>
+ <string name="title_activity_configuration_wizard">Select a service provider</string>
<string name="top_padding">Top padding</string>
- <string name="new_provider_button">Select new Provider</string>
- <string name="introduce_new_provider">Introduce new provider</string>
+ <string name="new_provider_button">Add new Provider</string>
+ <string name="introduce_new_provider">Add a new service provider</string>
<string name="save">Save</string>
- <string name="new_provider_uri">New provider\'s main URL</string>
+ <string name="new_provider_uri">Domain name</string>
<string name="valid_url_entered">It seems your URL is well formed</string>
<string name="not_valid_url_entered">It seems your URL is not well formed</string>
<string name="provider_details_fragment_title">Provider details</string>
@@ -286,8 +285,8 @@
<string name="username_ask">Please enter your username</string>
<string name="password_hint">password</string>
<string name="user_message">User message</string>
- <string name="error_srp_math_error_user_message">Try again: server math error.</string>
- <string name="error_bad_user_password_user_message">Not valid username and/or password.</string>
+ <string name="error_srp_math_error_user_message">Try again: server math error.</string>
+ <string name="error_bad_user_password_user_message">Incorrect username or password.</string>
<string name="error_not_valid_password_user_message">It should have at least 8 characters.</string>
<string name="error_client_http_user_message">Try again: Client HTTP error</string>
<string name="error_io_exception_user_message">Try again: I/O error</string>
@@ -295,7 +294,7 @@
<string name="error_no_such_algorithm_exception_user_message">Update the app</string>
<string name="login_button">Log In</string>
<string name="logout_button">Log Out</string>
- <string name="danger_checkbox">Trust completely</string>
+ <string name="danger_checkbox">Skip security check</string>
<string name="setup_error_title">Configuration Error</string>
<string name="setup_error_configure_button">Configure</string>
<string name="setup_error_close_button">Exit</string>
@@ -314,10 +313,10 @@
<string name="certificate_error">This is not a trusted Bitmask provider.</string>
<string name="configuring_provider">Configuring provider</string>
<string name="authenticating_title">Authenticating</string>
- <string name="authenticating_message">Authenticating with entered login and password.</string>
+ <string name="authenticating_message">Logging in</string>
<string name="logout_title">Log out</string>
<string name="logout_message">Logging out from this session.</string>
- <string name="not_valid_password_message">Your password is not well-formed: it should have at least 8 characters.</string>
+ <string name="not_valid_password_message">Invalid password: must be at least 8 characters.</string>
<string name="succesful_authentication_message">Authentication succeeded.</string>
<string name="authentication_failed_message">Authentication failed.</string>
<string name="successful_log_out_message">Logged out.</string>
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<String> arg = new Vector<String>();
Vector<Vector<String>> args = new Vector<Vector<String>>();
@@ -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<Vector<String>>) 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<String>) arg.clone());
+ options.put("location", (Vector<Vector<String>>) 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<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="";