From ee49de021bab8838ed44897f1046cb7d0f8f5921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 16 Jun 2014 22:31:50 +0200 Subject: Check if there is an active gateway selected. The active gateway cannot be null. --- app/src/main/java/se/leap/bitmaskclient/EIP.java | 4 +- app/src/main/res/values/untranslatable.xml | 78 +++++++++++++++++++++++- 2 files changed, 80 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java index 59faf93f..a7a17e5f 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java @@ -234,8 +234,9 @@ public final class EIP extends IntentService { * Intent to {@link se.leap.openvpn.LaunchVPN} */ private void startEIP() { - activeGateway = selectGateway(); + activeGateway = selectGateway(); + if(activeGateway != null && activeGateway.mVpnProfile != null) { Intent intent = new Intent(this,LaunchVPN.class); intent.setAction(Intent.ACTION_MAIN); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); @@ -245,6 +246,7 @@ public final class EIP extends IntentService { intent.putExtra(RECEIVER_TAG, mReceiver); startActivity(intent); mPending = ACTION_START_EIP; + } } /** diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index 50e598ac..4212cec2 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -777,4 +777,80 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 65fb5a54be48e2664f1e4ef1faf1c36f881be09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 16 Jun 2014 22:39:53 +0200 Subject: Bump version code for hotfix. --- app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a2c2a82f..74af659a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,7 @@ -- cgit v1.2.3 From 55c7a76f27b04db8a05400882897f88f8436bfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 17 Jun 2014 12:24:36 +0200 Subject: Progressbar can be null if there is no EIP service This happens when you've used a eip enabled provider, and then you switch to a non eip enabled one (e.g., choosing demo.bitmask.net and then switching to cdev.bitmask.net in their current configurations). I've also disabled the build task dependency on updating ics-openvpn. It's causing problems, while not fixing anything. --- app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java index 446ba1d9..299d89a4 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java @@ -221,7 +221,8 @@ public class EipServiceFragment extends Fragment implements StateListener, OnChe mEipStartPending = false; } else if ( level == ConnectionStatus.LEVEL_NONETWORK || level == ConnectionStatus.LEVEL_NOTCONNECTED || level == ConnectionStatus.LEVEL_AUTH_FAILED) { statusMessage = getString(R.string.eip_state_not_connected); - getActivity().findViewById(R.id.eipProgress).setVisibility(View.GONE); + if(getActivity() != null && getActivity().findViewById(R.id.eipProgress) != null) + getActivity().findViewById(R.id.eipProgress).setVisibility(View.GONE); mEipStartPending = false; switchState = false; } else if (level == ConnectionStatus.LEVEL_CONNECTING_SERVER_REPLIED) { -- cgit v1.2.3 From 6ac43e5e95046308815581abf3189f12df841923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 19 Jun 2014 16:39:27 +0200 Subject: Provider name in Dashboard is ellipsized correctly --- app/src/main/res/layout/client_dashboard.xml | 58 ++++++++++------------------ app/src/main/res/values/untranslatable.xml | 3 +- 2 files changed, 23 insertions(+), 38 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/res/layout/client_dashboard.xml b/app/src/main/res/layout/client_dashboard.xml index a5387efd..0103e7bc 100644 --- a/app/src/main/res/layout/client_dashboard.xml +++ b/app/src/main/res/layout/client_dashboard.xml @@ -10,44 +10,28 @@ android:layout_width="match_parent" android:layout_height="40dp" android:background="?android:attr/selectableItemBackground" > - - - - - - - - - - + + + + - + + \ No newline at end of file -- cgit v1.2.3 From f721df21a6fd1f3bb2588e67298ae33993041779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 19 Jun 2014 16:41:53 +0200 Subject: Reordered introduced lines in textviews --- app/src/main/res/layout/client_dashboard.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/res/layout/client_dashboard.xml b/app/src/main/res/layout/client_dashboard.xml index 0103e7bc..f33ac285 100644 --- a/app/src/main/res/layout/client_dashboard.xml +++ b/app/src/main/res/layout/client_dashboard.xml @@ -12,9 +12,9 @@ android:background="?android:attr/selectableItemBackground" > Date: Wed, 18 Jun 2014 20:35:58 +0200 Subject: provider.json is downloaded before ca.crt We don't assume ca.crt is in /ca.crt anymore, but fetch the complete url from provider.json. We also signup against users.json file instead of simple "users", which worked for *.bitmask.net domains. --- app/src/main/java/se/leap/bitmaskclient/Provider.java | 1 + 1 file changed, 1 insertion(+) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/Provider.java b/app/src/main/java/se/leap/bitmaskclient/Provider.java index 216f4261..5326709f 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Provider.java +++ b/app/src/main/java/se/leap/bitmaskclient/Provider.java @@ -51,6 +51,7 @@ public final class Provider implements Serializable { SERVICE = "service", KEY = "provider", CA_CERT = "ca_cert", + CA_CERT_URI = "ca_cert_uri", NAME = "name", DESCRIPTION = "description", DOMAIN = "domain", -- cgit v1.2.3 From 0bf036dae1cc8d2be7129cd8f39474af8cdb9f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 20 Jun 2014 12:29:56 +0200 Subject: Service is down message correctly shown. I've also fixed another message: if a file to be downloaded is not found, we say the entered provider isn't a LEAP provider. This is based on the fact that if provider.json doesn't exist/contain valid information, then the url isn't pointing to a LEAP provider. --- app/src/main/res/values/strings.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/src/main') diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d7114b73..62d54981 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -52,6 +52,7 @@ Server is unreachable, please try again. It doesn\'t seem to be a Bitmask provider. This is not a trusted Bitmask provider. + Service is down. Configuring provider Your anon cert was not downloaded Logging in -- cgit v1.2.3 From d0383a325d3ec81be8dc354cb806f74b8d047c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 20 Jun 2014 00:35:08 +0200 Subject: Removed isRunning from OpenVpnService. We use the broadcasted eip status from ics-openvpn to know if we're connected or not. --- app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java | 7 ------- app/src/main/java/se/leap/bitmaskclient/EIP.java | 10 +++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'app/src/main') 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 b5bba5d4..f08684b6 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java @@ -72,13 +72,6 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac private String mLastTunCfg; private String mRemoteGW; - //TODO We should know if this is running or not without this method - public boolean isRunning() { - if (mStarting == true || mProcessThread != null) - return true; - else - return false; - } // From: http://stackoverflow.com/questions/3758606/how-to-convert-byte-size-into-human-readable-format-in-java public static String humanReadableByteCount(long bytes, boolean mbit) { if (mbit) diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java index a7a17e5f..c439d6b7 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java @@ -142,7 +142,7 @@ public final class EIP extends IntentService { return bindService(bindIntent, mVpnServiceConn, BIND_AUTO_CREATE); } - private static ServiceConnection mVpnServiceConn = new ServiceConnection() { + private ServiceConnection mVpnServiceConn = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { LocalBinder binder = (LocalBinder) service; @@ -151,7 +151,7 @@ public final class EIP extends IntentService { if (mReceiver != null && mPending != null) { - boolean running = mVpnService.isRunning(); + boolean running = isConnected(); int resultCode = Activity.RESULT_CANCELED; @@ -202,7 +202,7 @@ public final class EIP extends IntentService { Bundle resultData = new Bundle(); resultData.putString(REQUEST_TAG, ACTION_IS_EIP_RUNNING); int resultCode = Activity.RESULT_CANCELED; - boolean is_connected = getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).getString(STATUS, "").equalsIgnoreCase("LEVEL_CONNECTED"); + boolean is_connected = isConnected(); if (mBound) { resultCode = (is_connected) ? Activity.RESULT_OK : Activity.RESULT_CANCELED; @@ -228,6 +228,10 @@ public final class EIP extends IntentService { } } } + + private boolean isConnected() { + return getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).getString(STATUS, "").equalsIgnoreCase("LEVEL_CONNECTED"); + } /** * Initiates an EIP connection by selecting a gateway and preparing and sending an -- cgit v1.2.3 From 93d5f11aed48eb822f02a9fede4a2819d053ad83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 20 Jun 2014 02:42:43 +0200 Subject: Removed setDefinition from ConfigParser. We now directly use the parseConfiguration method, translating the eip-service.json openvpn options to a string containing the corresponding openvpn config file lines. --- .../java/de/blinkt/openvpn/core/ConfigParser.java | 8 - app/src/main/java/se/leap/bitmaskclient/EIP.java | 181 +++++++++------------ 2 files changed, 79 insertions(+), 110 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java index 4fbbe165..5d5b3471 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java @@ -25,14 +25,6 @@ public class ConfigParser { private boolean extraRemotesAsCustom=false; - - /* - * TODO: We shouldn't be using this method. - * We need to figure out how to use just parseConfig, probably removing parseOptions. - */ - public void setDefinition(HashMap>> args) { - options = args; - } public void parseConfig(Reader reader) throws IOException, ConfigParseError { diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java index c439d6b7..c340467c 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java @@ -16,6 +16,8 @@ */ package se.leap.bitmaskclient; +import java.io.StringReader; +import java.io.IOException; import java.util.Calendar; import java.util.Collection; import java.util.HashMap; @@ -472,7 +474,6 @@ public final class EIP extends IntentService { } } - this.parseOptions(); this.createVPNProfile(); setUniqueProfileName(vpl); @@ -508,125 +509,101 @@ public final class EIP extends IntentService { } } - /** - * FIXME This method is really the outline of the refactoring needed in se.leap.openvpn.ConfigParser - */ - private void parseOptions(){ - - // FIXME move these to a common API (& version) definition place, like ProviderAPI or ConfigHelper - String common_options = "openvpn_configuration"; - String remote = "ip_address"; - String ports = "ports"; - String protos = "protocols"; - String capabilities = "capabilities"; - String location_key = "location"; - String locations = "locations"; - - Vector arg = new Vector(); - Vector> args = new Vector>(); + /** + * Parses data from eip-service.json to a section of the openvpn config file + */ + private StringReader configFromEipServiceDotJson() { + String parsed_configuration = ""; + + String common_options = "openvpn_configuration"; + String remote = "ip_address"; + String ports = "ports"; + String protos = "protocols"; + String capabilities = "capabilities"; + String location_key = "location"; + String locations = "locations"; + + Vector arg = new Vector(); + Vector> args = new Vector>(); - try { - JSONObject def = (JSONObject) eipDefinition.get(common_options); - Iterator keys = def.keys(); - Vector> value = new Vector>(); - while ( keys.hasNext() ){ - String key = keys.next().toString(); + try { + JSONObject openvpn_configuration = eipDefinition.getJSONObject(common_options); + Iterator keys = openvpn_configuration.keys(); + Vector> value = new Vector>(); + while ( keys.hasNext() ){ + String key = keys.next().toString(); - arg.add(key); - for ( String word : def.getString(key).split(" ") ) - arg.add(word); - value.add( (Vector) arg.clone() ); - options.put(key, (Vector>) value.clone()); - value.clear(); - arg.clear(); - } - } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - // We are always client, because the ifconfig will be received by a needed command - options.put("client", null); - - try { - arg.add(remote); - arg.add(mGateway.getString(remote)); - } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - args.add((Vector) arg.clone()); - options.put("remote", (Vector>) args.clone() ); - arg.clear(); - args.clear(); - - + parsed_configuration += key + " "; + for ( String word : openvpn_configuration.getString(key).split(" ") ) + parsed_configuration += word + " "; + parsed_configuration += System.getProperty("line.separator"); - // try { - // arg.add(location_key); - // String locationText = ""; - // locationText = eipDefinition.getJSONObject(locations).getJSONObject(mGateway.getString(location_key)).getString("name"); - // arg.add(locationText); - // Log.d(TAG, "location = " + locationText); + } + } catch (JSONException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } - // } catch (JSONException e) { - // // TODO Auto-generated catch block - // e.printStackTrace(); - // } - // args.add((Vector) arg.clone()); - // options.put("location", (Vector>) args.clone() ); + parsed_configuration += "client" + System.getProperty("line.separator"); - // arg.clear(); - // args.clear(); - JSONArray protocolsJSON = null; - arg.add("proto"); - try { - protocolsJSON = mGateway.getJSONObject(capabilities).getJSONArray(protos); - } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Vector protocols = new Vector(); - for ( int i=0; i) arg.clone()); - options.put("proto", (Vector>) args.clone()); - arg.clear(); - args.clear(); - - - String port = null; - arg.add("port"); - try { - port = mGateway.getJSONObject(capabilities).getJSONArray(ports).optString(0); - } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - arg.add(port); - args.add((Vector) arg.clone()); - options.put("port", (Vector>) args.clone()); - args.clear(); - arg.clear(); + try { + JSONArray protocolsJSON = mGateway.getJSONObject(capabilities).getJSONArray(protos); + String remote_line = "remote"; + for ( int i=0; i>) args.clone() ); + + // arg.clear(); + // args.clear(); + + Log.d("EIP", "parsed configuration"); + Log.d("EIP", parsed_configuration); + return new StringReader(parsed_configuration.trim()); + } + /** * Create and attach the VpnProfile to our gateway object */ protected void createVPNProfile(){ try { ConfigParser cp = new ConfigParser(); - cp.setDefinition(options); + cp.parseConfig(configFromEipServiceDotJson()); VpnProfile vp = cp.convertProfile(); mVpnProfile = vp; Log.v(TAG,"Created VPNProfile"); } catch (ConfigParseError e) { // FIXME We didn't get a VpnProfile! Error handling! and log level - Log.v(TAG,"Error createing VPNProfile"); + Log.v(TAG,"Error creating VPNProfile"); + e.printStackTrace(); + } catch (IOException e) { + // FIXME We didn't get a VpnProfile! Error handling! and log level + Log.v(TAG,"Error creating VPNProfile"); e.printStackTrace(); } } -- cgit v1.2.3 From a7408bea88dc5eedecaba0ef430e63c6cca9ec20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 20 Jun 2014 03:34:50 +0200 Subject: Removed the authentication bits from VpnProfile. Now we embed the openvpn cert, the corresponding ca cert and the user key directly from EIP, while creating a vpn profile. We leave VpnProfile untouched. --- .../main/java/de/blinkt/openvpn/VpnProfile.java | 23 +++----- app/src/main/java/se/leap/bitmaskclient/EIP.java | 69 ++++++++++++++++++++-- 2 files changed, 72 insertions(+), 20 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index d21a085f..d351610d 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -2,12 +2,6 @@ package de.blinkt.openvpn; import se.leap.bitmaskclient.R; -import se.leap.bitmaskclient.R; - -import se.leap.bitmaskclient.EIP; -import se.leap.bitmaskclient.Dashboard; -import se.leap.bitmaskclient.Provider; - import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -95,7 +89,7 @@ public class VpnProfile implements Serializable { // but needs to keep wrong name to guarante loading of old // profiles public transient boolean profileDleted = false; - public int mAuthenticationType = TYPE_CERTIFICATES; + public int mAuthenticationType = TYPE_KEYSTORE; public String mName; public String mAlias; public String mClientCertFilename; @@ -281,13 +275,14 @@ public class VpnProfile implements Serializable { switch (mAuthenticationType) { case VpnProfile.TYPE_USERPASS_CERTIFICATES: cfg += "auth-user-pass\n"; - case VpnProfile.TYPE_CERTIFICATES: - // FIXME This is all we need...The whole switch statement can go... - SharedPreferences preferences = context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, context.MODE_PRIVATE); - cfg+="\n"+preferences.getString(Provider.CA_CERT, "")+"\n\n"; - cfg+="\n"+preferences.getString(EIP.PRIVATE_KEY, "")+"\n\n"; - cfg+="\n"+preferences.getString(EIP.CERTIFICATE, "")+"\n\n"; - + case VpnProfile.TYPE_CERTIFICATES: + // Ca + cfg += insertFileData("ca", mCaFilename); + + // Client Cert + Key + cfg += insertFileData("key", mClientKeyFilename); + cfg += insertFileData("cert", mClientCertFilename); + break; case VpnProfile.TYPE_USERPASS_PKCS12: cfg += "auth-user-pass\n"; diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java index c340467c..21a573fe 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package se.leap.bitmaskclient; +package se.leap.bitmaskclient; import java.io.StringReader; import java.io.IOException; @@ -33,6 +33,9 @@ import org.json.JSONException; import org.json.JSONObject; import se.leap.bitmaskclient.R; +import se.leap.bitmaskclient.Dashboard; +import se.leap.bitmaskclient.Provider; + import de.blinkt.openvpn.activities.DisconnectVPN; import de.blinkt.openvpn.core.ConfigParser; import de.blinkt.openvpn.core.ConfigParser.ConfigParseError; @@ -42,12 +45,14 @@ import de.blinkt.openvpn.core.OpenVpnService; import de.blinkt.openvpn.core.OpenVpnService.LocalBinder; import de.blinkt.openvpn.core.ProfileManager; import de.blinkt.openvpn.VpnProfile; + import android.app.Activity; import android.app.IntentService; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; +import android.content.SharedPreferences; import android.drm.DrmStore.Action; import android.os.Bundle; import android.os.IBinder; @@ -62,6 +67,7 @@ import android.util.Log; * gateways, and controlling {@link de.blinkt.openvpn.core.OpenVpnService} connections. * * @author Sean Leonard + * @author Parménides GV */ public final class EIP extends IntentService { @@ -512,7 +518,7 @@ public final class EIP extends IntentService { /** * Parses data from eip-service.json to a section of the openvpn config file */ - private StringReader configFromEipServiceDotJson() { + private String configFromEipServiceDotJson() { String parsed_configuration = ""; String common_options = "openvpn_configuration"; @@ -582,19 +588,70 @@ public final class EIP extends IntentService { // arg.clear(); // args.clear(); - Log.d("EIP", "parsed configuration"); - Log.d("EIP", parsed_configuration); - return new StringReader(parsed_configuration.trim()); + return parsed_configuration; } + + + private String caSecretFromSharedPreferences() { + String secret_lines = ""; + SharedPreferences preferences = context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, context.MODE_PRIVATE); + System.getProperty("line.separator"); + secret_lines += ""; + secret_lines += System.getProperty("line.separator"); + secret_lines += preferences.getString(Provider.CA_CERT, ""); + secret_lines += System.getProperty("line.separator"); + secret_lines += ""; + + return secret_lines; + } + + private String keySecretFromSharedPreferences() { + String secret_lines = ""; + SharedPreferences preferences = context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, context.MODE_PRIVATE); + + secret_lines += System.getProperty("line.separator"); + secret_lines +=""; + secret_lines += System.getProperty("line.separator"); + secret_lines += preferences.getString(EIP.PRIVATE_KEY, ""); + secret_lines += System.getProperty("line.separator"); + secret_lines += ""; + secret_lines += System.getProperty("line.separator"); + + return secret_lines; + } + + private String certSecretFromSharedPreferences() { + String secret_lines = ""; + SharedPreferences preferences = context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, context.MODE_PRIVATE); + + secret_lines += System.getProperty("line.separator"); + secret_lines +=""; + secret_lines += System.getProperty("line.separator"); + secret_lines += preferences.getString(EIP.CERTIFICATE, ""); + secret_lines += System.getProperty("line.separator"); + secret_lines += ""; + secret_lines += System.getProperty("line.separator"); + + return secret_lines; + } + /** * Create and attach the VpnProfile to our gateway object */ protected void createVPNProfile(){ try { ConfigParser cp = new ConfigParser(); - cp.parseConfig(configFromEipServiceDotJson()); + Log.d(TAG, configFromEipServiceDotJson()); + Log.d(TAG, caSecretFromSharedPreferences()); + Log.d(TAG, keySecretFromSharedPreferences()); + Log.d(TAG, certSecretFromSharedPreferences()); + cp.parseConfig(new StringReader(configFromEipServiceDotJson())); + cp.parseConfig(new StringReader(caSecretFromSharedPreferences())); + cp.parseConfig(new StringReader(keySecretFromSharedPreferences())); + cp.parseConfig(new StringReader(certSecretFromSharedPreferences())); VpnProfile vp = cp.convertProfile(); + //vp.mAuthenticationType=VpnProfile.TYPE_STATICKEYS; mVpnProfile = vp; Log.v(TAG,"Created VPNProfile"); } catch (ConfigParseError e) { -- cgit v1.2.3 From e53c1b281014e584e6ad92593863870afe26499a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 20 Jun 2014 13:55:54 +0200 Subject: Updated ics-openvpn-upstream: less patches of ours. --- app/src/main/java/de/blinkt/openvpn/LaunchVPN.java | 30 +++---- .../main/java/de/blinkt/openvpn/VpnProfile.java | 2 + .../java/de/blinkt/openvpn/core/ConfigParser.java | 2 +- .../de/blinkt/openvpn/core/OpenVpnService.java | 5 +- .../de/blinkt/openvpn/fragments/LogFragment.java | 93 ++++++++++++---------- app/src/main/res/menu/logmenu.xml | 5 +- app/src/main/res/values-de/strings-icsopenvpn.xml | 6 +- app/src/main/res/values/untranslatable.xml | 38 +++++++++ 8 files changed, 116 insertions(+), 65 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java index f8487891..a39e780a 100644 --- a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java +++ b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java @@ -110,28 +110,28 @@ public class LaunchVPN extends Activity { } } - + + @Override protected void onActivityResult (int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode==START_VPN_PROFILE) { - if(resultCode == Activity.RESULT_OK) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - boolean showlogwindow = prefs.getBoolean("showlogwindow", true); - - if(!mhideLog && showlogwindow) - showLogWindow(); - new startOpenVpnThread().start(); - } else if (resultCode == Activity.RESULT_CANCELED) { - // User does not want us to start, so we just vanish - VpnStatus.updateStateString("USER_VPN_PERMISSION_CANCELLED", "", R.string.state_user_vpn_permission_cancelled, - ConnectionStatus.LEVEL_NOTCONNECTED); - - finish(); - } + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + boolean showlogwindow = prefs.getBoolean("showlogwindow", true); + + if(!mhideLog && showlogwindow) + showLogWindow(); + new startOpenVpnThread().start(); + } else if (resultCode == Activity.RESULT_CANCELED) { + // User does not want us to start, so we just vanish + VpnStatus.updateStateString("USER_VPN_PERMISSION_CANCELLED", "", R.string.state_user_vpn_permission_cancelled, + ConnectionStatus.LEVEL_NOTCONNECTED); + + finish(); } } + void showLogWindow() { Intent startLW = new Intent(getBaseContext(),LogWindow.class); diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index d351610d..0166eb98 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -2,6 +2,8 @@ package de.blinkt.openvpn; import se.leap.bitmaskclient.R; +import se.leap.bitmaskclient.R; + import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java index 5d5b3471..378b6b92 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java @@ -25,7 +25,7 @@ public class ConfigParser { private boolean extraRemotesAsCustom=false; - + public void parseConfig(Reader reader) throws IOException, ConfigParseError { 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 f08684b6..43b27212 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java @@ -34,7 +34,6 @@ import se.leap.bitmaskclient.BuildConfig; import se.leap.bitmaskclient.R; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.activities.DisconnectVPN; -import de.blinkt.openvpn.activities.LogWindow; import de.blinkt.openvpn.core.VpnStatus.ByteCountListener; import de.blinkt.openvpn.core.VpnStatus.ConnectionStatus; import de.blinkt.openvpn.core.VpnStatus.StateListener; @@ -44,6 +43,8 @@ import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_CONNECTED; import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_CONNECTING_NO_SERVER_REPLY_YET; import static de.blinkt.openvpn.core.VpnStatus.ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT; +import se.leap.bitmaskclient.Dashboard; + public class OpenVpnService extends VpnService implements StateListener, Callback, ByteCountListener { public static final String START_SERVICE = "de.blinkt.openvpn.START_SERVICE"; public static final String START_SERVICE_STICKY = "de.blinkt.openvpn.START_SERVICE_STICKY"; @@ -236,7 +237,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac PendingIntent getLogPendingIntent() { // Let the configure Button show the Log - Intent intent = new Intent(getBaseContext(), se.leap.bitmaskclient.Dashboard.class); + Intent intent = new Intent(getBaseContext(), Dashboard.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); PendingIntent startLW = PendingIntent.getActivity(this, 0, intent, 0); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); diff --git a/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java b/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java index 2f04d235..6e592121 100644 --- a/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java +++ b/app/src/main/java/de/blinkt/openvpn/fragments/LogFragment.java @@ -7,33 +7,39 @@ import se.leap.bitmaskclient.R; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; -import android.app.*; -import android.content.*; +import android.app.Activity; +import android.app.AlertDialog; +import android.app.ListFragment; +import android.content.ClipData; +import android.content.ClipboardManager; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; import android.database.DataSetObserver; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.os.Handler.Callback; -import android.os.IBinder; import android.os.Message; import android.text.SpannableString; import android.text.format.DateFormat; import android.text.style.ImageSpan; -import android.view.*; -import android.widget.*; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; import android.widget.AdapterView.OnItemLongClickListener; -import de.blinkt.openvpn.*; -import de.blinkt.openvpn.activities.DisconnectVPN; -import se.leap.bitmaskclient.Dashboard; -import de.blinkt.openvpn.core.OpenVPNManagement; -import de.blinkt.openvpn.core.VpnStatus; -import de.blinkt.openvpn.core.VpnStatus.ConnectionStatus; -import de.blinkt.openvpn.core.VpnStatus.LogItem; -import de.blinkt.openvpn.core.VpnStatus.LogListener; -import de.blinkt.openvpn.core.VpnStatus.StateListener; -import de.blinkt.openvpn.core.OpenVpnService; -import de.blinkt.openvpn.core.OpenVpnService.LocalBinder; -import de.blinkt.openvpn.core.ProfileManager; +import android.widget.LinearLayout; +import android.widget.ListAdapter; +import android.widget.ListView; +import android.widget.RadioGroup; +import android.widget.SeekBar; +import android.widget.TextView; +import android.widget.Toast; + import org.jetbrains.annotations.Nullable; import java.text.SimpleDateFormat; @@ -42,31 +48,29 @@ import java.util.Date; import java.util.Locale; import java.util.Vector; +import de.blinkt.openvpn.LaunchVPN; +import se.leap.bitmaskclient.R; +import de.blinkt.openvpn.VpnProfile; +import de.blinkt.openvpn.activities.DisconnectVPN; +import de.blinkt.openvpn.core.OpenVPNManagement; +import de.blinkt.openvpn.core.OpenVpnService; +import de.blinkt.openvpn.core.ProfileManager; +import de.blinkt.openvpn.core.VpnStatus; +import de.blinkt.openvpn.core.VpnStatus.ConnectionStatus; +import de.blinkt.openvpn.core.VpnStatus.LogItem; +import de.blinkt.openvpn.core.VpnStatus.LogListener; +import de.blinkt.openvpn.core.VpnStatus.StateListener; + import static de.blinkt.openvpn.core.OpenVpnService.humanReadableByteCount; +import se.leap.bitmaskclient.Dashboard; + public class LogFragment extends ListFragment implements StateListener, SeekBar.OnSeekBarChangeListener, RadioGroup.OnCheckedChangeListener, VpnStatus.ByteCountListener { private static final String LOGTIMEFORMAT = "logtimeformat"; private static final int START_VPN_CONFIG = 0; private static final String VERBOSITYLEVEL = "verbositylevel"; - protected OpenVpnService mService; - private ServiceConnection mConnection = new ServiceConnection() { - @Override - public void onServiceConnected(ComponentName className, - IBinder service) { - // We've bound to LocalService, cast the IBinder and get LocalService instance - LocalBinder binder = (LocalBinder) service; - mService = binder.getService(); - } - - @Override - public void onServiceDisconnected(ComponentName arg0) { - mService =null; - } - - }; - private SeekBar mLogLevelSlider; private LinearLayout mOptionsLayout; private RadioGroup mTimeRadioGroup; @@ -425,8 +429,18 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. Intent intent = new Intent(getActivity(),DisconnectVPN.class); startActivity(intent); return true; - } else if(item.getItemId()==R.id.send) { + } else if(item.getItemId()==R.id.send) { ladapter.shareLog(); + } else if(item.getItemId()==R.id.edit_vpn) { + VpnProfile lastConnectedprofile = ProfileManager.getLastConnectedVpn(); + + if(lastConnectedprofile!=null) { + Intent vprefintent = new Intent(getActivity(),Dashboard.class) + .putExtra(VpnProfile.EXTRA_PROFILEUUID,lastConnectedprofile.getUUIDString()); + startActivityForResult(vprefintent,START_VPN_CONFIG); + } else { + Toast.makeText(getActivity(), R.string.log_no_last_vpn, Toast.LENGTH_LONG).show(); + } } else if(item.getItemId() == R.id.toggle_time) { showHideOptionsPanel(); } else if(item.getItemId() == android.R.id.home) { @@ -492,10 +506,6 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. Intent intent = new Intent(getActivity(), OpenVpnService.class); intent.setAction(OpenVpnService.START_SERVICE); - getActivity().bindService(intent, mConnection, Context.BIND_AUTO_CREATE); - - - } @@ -531,14 +541,13 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. super.onActivityResult(requestCode, resultCode, data); } - @Override + + @Override public void onStop() { super.onStop(); VpnStatus.removeStateListener(this); VpnStatus.removeByteCountListener(this); - if(mService!=null) - getActivity().unbindService(mConnection); getActivity().getPreferences(0).edit().putInt(LOGTIMEFORMAT, ladapter.mTimeFormat) .putInt(VERBOSITYLEVEL, ladapter.mLogLevel).apply(); diff --git a/app/src/main/res/menu/logmenu.xml b/app/src/main/res/menu/logmenu.xml index c498eefc..c8c9e815 100644 --- a/app/src/main/res/menu/logmenu.xml +++ b/app/src/main/res/menu/logmenu.xml @@ -33,6 +33,7 @@ android:alphabeticShortcut="e" android:icon="@android:drawable/ic_menu_edit" android:showAsAction="withText|ifRoom" - android:title="@string/edit_vpn"/> + android:title="@string/edit_vpn" + android:visible="false"/> - \ No newline at end of file + diff --git a/app/src/main/res/values-de/strings-icsopenvpn.xml b/app/src/main/res/values-de/strings-icsopenvpn.xml index 9bf58685..bf115be5 100755 --- a/app/src/main/res/values-de/strings-icsopenvpn.xml +++ b/app/src/main/res/values-de/strings-icsopenvpn.xml @@ -62,7 +62,7 @@ VPN löschen Überprüfe, ob der Server ein Zertifikat mit TLS-Servererweiterungen verwendet (--remote-cert-tls server) TLS-Serverzertifikat erwarten - Server Zertifikatssubjekt überprüfen + Server Zertifikatssubjekt DN überprüfen Zertifikat Namen überprüfen Spezifizieren Sie die Methode mit welcher der DN des Serverzertifikates (z. B. C=DE, L=Paderborn, OU=Avian IP-Carrier, CN=openvpn.blinkt.de) überprüft wird.\n\nSie können den vollständigen DN oder den RDN (openvpn.blinkt.de im Beispiel) oder ein RDN-Präfix angeben.\n\nDer RDN Präfix \"Server\" erlaubt z.B. \"Server-1\" und \"Server-2\" \n\nWenn Sie das Eingabefeld leer lassen, wird der RDN gegen den Servernamen geprüft.\n\n Für weitere Details sehen Sie die Manpage von OpenVPN 2.3.1+ unter —verify-x509-name Serverzertifikat Subject @@ -84,7 +84,7 @@ Leitet allen Internet Verkehr über das VPN Benutze Default Route Benutze eigene Routen. Geben Sie Zielnetzwerk im CIDR Format an. Z.b. \"10.0.0.0/8 2002::/16\" würde die Netzwerke 10.0.0.0/8 und 2002::/16 über das VPN routen. - Netze, die nicht über das VPN weitergeleitet werden sollen. Nutzt die gleiche Syntax wie die eigenen Routen. + Netze, die nicht über das VPN geleitet werden sollen. Nutzt die gleiche Syntax wie die eigenen Routen. Eigene Routen Ausgeschlossene Netze Log Detail Level @@ -312,7 +312,7 @@ %3$s: %1$s\n\n%2$s Wenn Sie ihr Gerät gerootet haben können Sie das <a href=\"http://xposed.info/\">Xposed Framework</a> und das <a href=\"http://repo.xposed.info/module/de.blinkt.vpndialogxposed\">VPN Dialog confirm Modul</a> auf eigene Gefahr installieren. Komplette Lizenzen - Netze, die direkt über ein lokales Interfaces erreicht werden können werden nicht über das VPN gerottet. Deaktivieren dieser Option leitet allen Verkehr, der für lokale Netzwerke bestimmt ist, über das VPN. + Netze, die direkt über ein lokales Interfaces erreicht werden können werden nicht über das VPN geroutet. Deaktivieren dieser Option leitet allen Verkehr, der für lokale Netzwerke bestimmt ist, über das VPN. VPN für lokale Netzwerke umgehen Datei mit Benutzername und Passwort [Importiert aus %s] diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index de355720..cc39df3d 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -833,6 +833,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From c66aa1bf6aea82e78d684d549113ed44639fb400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 20 Jun 2014 14:12:06 +0200 Subject: Bump build number and version - 0.5.3-RC1 --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 74af659a..8f78cd97 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,8 +17,8 @@ + android:versionCode="81" + android:versionName="0.5.3-RC1" > -- cgit v1.2.3 From 49aee8dd5fe884eabdc291d758bb8a635f9d1271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 24 Jun 2014 09:32:06 +0200 Subject: LEAP copyright updated until 2014. --- app/src/main/res/values/untranslatable.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index cc39df3d..6bffb192 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -3,7 +3,7 @@ Bitmask Bitmask - Copyright 2012\nLEAP Encryption Access Project <info@leap.se> + Copyright 2012-2014\nLEAP Encryption Access Project <info@leap.se> Copyright © 2002–2010 OpenVPN Technologies, Inc. <sales@openvpn.net>\n "OpenVPN" is a trademark of OpenVPN Technologies, Inc. @@ -892,4 +892,4 @@ - \ No newline at end of file + -- cgit v1.2.3 From c228f481090a468106b57593117d95d9e3dda3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 24 Jun 2014 10:00:31 +0200 Subject: Tracker link pointing to chili --- app/src/main/res/layout/about.xml | 6 ++++++ app/src/main/res/values-es/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 3 ++- app/src/main/res/values/untranslatable.xml | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/res/layout/about.xml b/app/src/main/res/layout/about.xml index 4b3f16e0..ccb1ea26 100644 --- a/app/src/main/res/layout/about.xml +++ b/app/src/main/res/layout/about.xml @@ -37,6 +37,12 @@ android:autoLink="all" android:text="@string/repository_url_text" /> + + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 6a9cce29..ec8c21ff 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -6,4 +6,6 @@ Rutas IPv6: %s El nombre de usuario no debe estar vacío. Conseguido el certificado de \'%s\' de almacén de claves + Código fuente disponible en https://github.com/leapcode/bitmask_android/ + Tracker disponible en https://leap.se/code diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 62d54981..bb68b942 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2,7 +2,8 @@ Retry - Source code and issue tracker available at https://github.com/leapcode/bitmask_android/ + Source code available at https://github.com/leapcode/bitmask_android/ + Tracker available at https://leap.se/code Translations welcome and appreciated. See our Transifex project at https://www.transifex.com/projects/p/bitmask-android/ Switch provider info diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index 6bffb192..f956b6bd 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -892,4 +892,5 @@ - + + \ No newline at end of file -- cgit v1.2.3 From 55e9c0c60b94c09f8321dccd2971b32d92ec72a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 24 Jun 2014 10:29:09 +0200 Subject: We don't predict future certificate. --- app/src/main/java/se/leap/bitmaskclient/Dashboard.java | 4 ++-- app/src/main/res/values/strings.xml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index f2763d84..66c305e6 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java +++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java @@ -507,9 +507,9 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf case ProviderAPI.SRP_AUTHENTICATION_SUCCESSFUL: eipStatus.setText(R.string.succesful_authentication_message); break; case ProviderAPI.SRP_AUTHENTICATION_FAILED: eipStatus.setText(R.string.authentication_failed_message); break; - case ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE: eipStatus.setText(R.string.future_authed_secured_status); break; + case ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE: break; case ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE: eipStatus.setText(R.string.incorrectly_downloaded_certificate_message); break; - case ProviderAPI.LOGOUT_SUCCESSFUL: eipStatus.setText(R.string.future_anonymous_secured_status); break; + case ProviderAPI.LOGOUT_SUCCESSFUL: break; case ProviderAPI.LOGOUT_FAILED: eipStatus.setText(R.string.log_out_failed_message); break; } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bb68b942..6db6962f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,9 +17,7 @@ No provider configured Access EIP connection settings Status unknown. - Connection will be secure using an anonymous certificate. Connection secure using an anonymous certificate. - Connection will be secure using your own certificate. Connection secure using your own certificate. Encrypted Internet Select a service provider -- cgit v1.2.3 From 58785d184e4acf5f60f3b40f7387c233777b5c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 25 Jun 2014 18:55:13 +0200 Subject: Update notification icons. If the connection is being established, the key with a clock icon is shown. If the connection has been established, the key without the clock icon is shown. I've also added all some icons to more resolutions. --- app/src/main/res/drawable-hdpi/ic_stat_vpn.png | Bin 0 -> 539 bytes .../main/res/drawable-hdpi/ic_stat_vpn_empty_halo.png | Bin 816 -> 721 bytes app/src/main/res/drawable-hdpi/ic_stat_vpn_offline.png | Bin 637 -> 801 bytes app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png | Bin 863 -> 28 bytes app/src/main/res/drawable-hdpi/ic_vpn_disconnected.png | Bin 801 -> 0 bytes app/src/main/res/drawable-ldpi/ic_stat_vpn.png | Bin 461 -> 757 bytes .../main/res/drawable-ldpi/ic_stat_vpn_empty_halo.png | Bin 0 -> 404 bytes app/src/main/res/drawable-ldpi/ic_stat_vpn_offline.png | Bin 0 -> 455 bytes app/src/main/res/drawable-ldpi/ic_stat_vpn_outline.png | 1 + app/src/main/res/drawable-mdpi/ic_stat_vpn.png | Bin 0 -> 502 bytes .../main/res/drawable-mdpi/ic_stat_vpn_empty_halo.png | Bin 545 -> 504 bytes app/src/main/res/drawable-mdpi/ic_stat_vpn_offline.png | Bin 451 -> 586 bytes app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png | Bin 609 -> 28 bytes app/src/main/res/drawable-xhdpi/ic_stat_vpn.png | Bin 0 -> 688 bytes .../main/res/drawable-xhdpi/ic_stat_vpn_empty_halo.png | Bin 1033 -> 902 bytes .../main/res/drawable-xhdpi/ic_stat_vpn_offline.png | Bin 834 -> 1091 bytes .../main/res/drawable-xhdpi/ic_stat_vpn_outline.png | Bin 1151 -> 28 bytes app/src/main/res/values/untranslatable.xml | 3 ++- 18 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_stat_vpn.png mode change 100644 => 120000 app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png delete mode 100644 app/src/main/res/drawable-hdpi/ic_vpn_disconnected.png create mode 100644 app/src/main/res/drawable-ldpi/ic_stat_vpn_empty_halo.png create mode 100644 app/src/main/res/drawable-ldpi/ic_stat_vpn_offline.png create mode 120000 app/src/main/res/drawable-ldpi/ic_stat_vpn_outline.png create mode 100644 app/src/main/res/drawable-mdpi/ic_stat_vpn.png mode change 100644 => 120000 app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_stat_vpn.png mode change 100644 => 120000 app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png (limited to 'app/src/main') diff --git a/app/src/main/res/drawable-hdpi/ic_stat_vpn.png b/app/src/main/res/drawable-hdpi/ic_stat_vpn.png new file mode 100644 index 00000000..c3547e85 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_stat_vpn.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_stat_vpn_empty_halo.png b/app/src/main/res/drawable-hdpi/ic_stat_vpn_empty_halo.png index 7df5b670..25f82a95 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_stat_vpn_empty_halo.png and b/app/src/main/res/drawable-hdpi/ic_stat_vpn_empty_halo.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_stat_vpn_offline.png b/app/src/main/res/drawable-hdpi/ic_stat_vpn_offline.png index 8aa48803..dfb962b9 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_stat_vpn_offline.png and b/app/src/main/res/drawable-hdpi/ic_stat_vpn_offline.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png deleted file mode 100644 index b5583d99..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png new file mode 120000 index 00000000..96d8d34d --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_stat_vpn_outline.png @@ -0,0 +1 @@ +./ic_stat_vpn_empty_halo.png \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/ic_vpn_disconnected.png b/app/src/main/res/drawable-hdpi/ic_vpn_disconnected.png deleted file mode 100644 index dfb962b9..00000000 Binary files a/app/src/main/res/drawable-hdpi/ic_vpn_disconnected.png and /dev/null differ diff --git a/app/src/main/res/drawable-ldpi/ic_stat_vpn.png b/app/src/main/res/drawable-ldpi/ic_stat_vpn.png index f973015c..65fc6db7 100644 Binary files a/app/src/main/res/drawable-ldpi/ic_stat_vpn.png and b/app/src/main/res/drawable-ldpi/ic_stat_vpn.png differ diff --git a/app/src/main/res/drawable-ldpi/ic_stat_vpn_empty_halo.png b/app/src/main/res/drawable-ldpi/ic_stat_vpn_empty_halo.png new file mode 100644 index 00000000..2df0a9bd Binary files /dev/null and b/app/src/main/res/drawable-ldpi/ic_stat_vpn_empty_halo.png differ diff --git a/app/src/main/res/drawable-ldpi/ic_stat_vpn_offline.png b/app/src/main/res/drawable-ldpi/ic_stat_vpn_offline.png new file mode 100644 index 00000000..22f3497e Binary files /dev/null and b/app/src/main/res/drawable-ldpi/ic_stat_vpn_offline.png differ diff --git a/app/src/main/res/drawable-ldpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-ldpi/ic_stat_vpn_outline.png new file mode 120000 index 00000000..482dafd3 --- /dev/null +++ b/app/src/main/res/drawable-ldpi/ic_stat_vpn_outline.png @@ -0,0 +1 @@ +./ic_stat_vpn_offline.png \ No newline at end of file diff --git a/app/src/main/res/drawable-mdpi/ic_stat_vpn.png b/app/src/main/res/drawable-mdpi/ic_stat_vpn.png new file mode 100644 index 00000000..7e167f84 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_stat_vpn.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_vpn_empty_halo.png b/app/src/main/res/drawable-mdpi/ic_stat_vpn_empty_halo.png index fc039a82..a658d9e9 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_stat_vpn_empty_halo.png and b/app/src/main/res/drawable-mdpi/ic_stat_vpn_empty_halo.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_vpn_offline.png b/app/src/main/res/drawable-mdpi/ic_stat_vpn_offline.png index f31387a4..f8b02bfb 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_stat_vpn_offline.png and b/app/src/main/res/drawable-mdpi/ic_stat_vpn_offline.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png deleted file mode 100644 index 052aef9d..00000000 Binary files a/app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png new file mode 120000 index 00000000..96d8d34d --- /dev/null +++ b/app/src/main/res/drawable-mdpi/ic_stat_vpn_outline.png @@ -0,0 +1 @@ +./ic_stat_vpn_empty_halo.png \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_vpn.png b/app/src/main/res/drawable-xhdpi/ic_stat_vpn.png new file mode 100644 index 00000000..1f46be2c Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_stat_vpn.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_empty_halo.png b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_empty_halo.png index 2f61e890..f4f28ef7 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_empty_halo.png and b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_empty_halo.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_offline.png b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_offline.png index e9411518..7f44c46f 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_offline.png and b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_offline.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png deleted file mode 100644 index 5d27240d..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png new file mode 120000 index 00000000..96d8d34d --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_stat_vpn_outline.png @@ -0,0 +1 @@ +./ic_stat_vpn_empty_halo.png \ No newline at end of file diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index 6bffb192..f956b6bd 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -892,4 +892,5 @@ - + + \ No newline at end of file -- cgit v1.2.3 From b5c84602ebb9bf2f593d4352dfe51029f44731b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 25 Jun 2014 19:44:14 +0200 Subject: Show "Logged out." message. --- app/src/main/java/se/leap/bitmaskclient/Dashboard.java | 4 ++-- app/src/main/res/values/strings.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index 66c305e6..cb451b86 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java +++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java @@ -496,7 +496,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf case ProviderAPI.SRP_AUTHENTICATION_FAILED: eipStatus.setText(R.string.authentication_failed_message); break; case ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE: eipStatus.setText(R.string.authed_secured_status); break; case ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE: eipStatus.setText(R.string.incorrectly_downloaded_certificate_message); break; - case ProviderAPI.LOGOUT_SUCCESSFUL: eipStatus.setText(R.string.anonymous_secured_status); break; + case ProviderAPI.LOGOUT_SUCCESSFUL: eipStatus.setText(R.string.logged_out_message); break; case ProviderAPI.LOGOUT_FAILED: eipStatus.setText(R.string.log_out_failed_message); break; } @@ -509,7 +509,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf case ProviderAPI.SRP_AUTHENTICATION_FAILED: eipStatus.setText(R.string.authentication_failed_message); break; case ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE: break; case ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE: eipStatus.setText(R.string.incorrectly_downloaded_certificate_message); break; - case ProviderAPI.LOGOUT_SUCCESSFUL: break; + case ProviderAPI.LOGOUT_SUCCESSFUL: eipStatus.setText(R.string.logged_out_message); break; case ProviderAPI.LOGOUT_FAILED: eipStatus.setText(R.string.log_out_failed_message); break; } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6db6962f..c928f001 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -57,6 +57,7 @@ Logging in Signing up Logging out from this session. + Logged out. Didn\'t logged out. Authentication succeeded. Authentication failed. -- cgit v1.2.3 From adfcb7f7a0586cb1ea21c531b5560ff20e0e486b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 26 Jun 2014 00:18:51 +0200 Subject: Bump build number and version for 0.5.3 RC2 --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8f78cd97..a98ede86 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,8 +17,8 @@ + android:versionCode="82" + android:versionName="0.5.3-RC2" > -- cgit v1.2.3 From 1d73097f06dd6b9d3ef55c59877b9b6551847dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 27 Jun 2014 19:53:18 +0200 Subject: Bump version and build number for 0.5.3 RC3. Forgot to commit before uploading actual APK. --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a98ede86..040d03b9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,8 +17,8 @@ + android:versionCode="83" + android:versionName="0.5.3-RC3" > -- cgit v1.2.3 From 3292c43a77f5be07e110452a332797169a90b345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 27 Jun 2014 20:01:46 +0200 Subject: Bump version and build number for 0.5.3 --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 040d03b9..f73d59cb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,8 +17,8 @@ + android:versionCode="84" + android:versionName="0.5.3" > -- cgit v1.2.3