summaryrefslogtreecommitdiff
path: root/src/se/leap/openvpn
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-10-21 01:03:45 -0700
committerSean Leonard <meanderingcode@aetherislands.net>2013-10-21 01:03:45 -0700
commit5e43d1ea5436af16f227a98fee495f707c885a96 (patch)
tree072b13f104cf2da87db80b0a6b78214139ae0618 /src/se/leap/openvpn
parentf49967fb3f24bf0a22d09b5823bd174a45e758f7 (diff)
parentf21030aacec6b7f36ea1b8adc86769e3f0b8a9ad (diff)
Merge branch 'release-0.2.1'0.2.1
Diffstat (limited to 'src/se/leap/openvpn')
-rw-r--r--src/se/leap/openvpn/ConfigConverter.java3
-rw-r--r--src/se/leap/openvpn/FaqFragment.java2
-rw-r--r--src/se/leap/openvpn/FileSelect.java3
-rw-r--r--src/se/leap/openvpn/FileSelectLayout.java2
-rw-r--r--src/se/leap/openvpn/FileSelectionFragment.java3
-rw-r--r--src/se/leap/openvpn/GeneralSettings.java3
-rw-r--r--src/se/leap/openvpn/InlineFileTab.java2
-rw-r--r--src/se/leap/openvpn/LaunchVPN.java12
-rw-r--r--src/se/leap/openvpn/LogWindow.java3
-rw-r--r--src/se/leap/openvpn/MainActivity.java3
-rw-r--r--src/se/leap/openvpn/NetworkSateReceiver.java2
-rw-r--r--src/se/leap/openvpn/OpenVPN.java3
-rw-r--r--src/se/leap/openvpn/OpenVPNThread.java3
-rw-r--r--src/se/leap/openvpn/OpenVpnManagementThread.java3
-rw-r--r--src/se/leap/openvpn/OpenVpnPreferencesFragment.java2
-rw-r--r--src/se/leap/openvpn/OpenVpnService.java6
-rw-r--r--src/se/leap/openvpn/ProxyDetection.java3
-rw-r--r--src/se/leap/openvpn/Settings_Authentication.java2
-rw-r--r--src/se/leap/openvpn/Settings_Basic.java4
-rw-r--r--src/se/leap/openvpn/Settings_IP.java2
-rw-r--r--src/se/leap/openvpn/Settings_Obscure.java2
-rw-r--r--src/se/leap/openvpn/Settings_Routing.java2
-rw-r--r--src/se/leap/openvpn/ShowConfigFragment.java2
-rw-r--r--src/se/leap/openvpn/VPNLaunchHelper.java3
-rw-r--r--src/se/leap/openvpn/VPNPreferences.java3
-rw-r--r--src/se/leap/openvpn/VPNProfileList.java3
-rw-r--r--src/se/leap/openvpn/VpnProfile.java14
27 files changed, 55 insertions, 40 deletions
diff --git a/src/se/leap/openvpn/ConfigConverter.java b/src/se/leap/openvpn/ConfigConverter.java
index 8b5f316d..3c6bf91e 100644
--- a/src/se/leap/openvpn/ConfigConverter.java
+++ b/src/se/leap/openvpn/ConfigConverter.java
@@ -9,7 +9,8 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import java.util.Vector;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.app.Activity;
import android.app.AlertDialog;
diff --git a/src/se/leap/openvpn/FaqFragment.java b/src/se/leap/openvpn/FaqFragment.java
index 2b9f02eb..dc498087 100644
--- a/src/se/leap/openvpn/FaqFragment.java
+++ b/src/se/leap/openvpn/FaqFragment.java
@@ -8,7 +8,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class FaqFragment extends Fragment {
diff --git a/src/se/leap/openvpn/FileSelect.java b/src/se/leap/openvpn/FileSelect.java
index 4abf6c31..4b88e7a7 100644
--- a/src/se/leap/openvpn/FileSelect.java
+++ b/src/se/leap/openvpn/FileSelect.java
@@ -6,7 +6,8 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.app.ActionBar;
import android.app.ActionBar.Tab;
diff --git a/src/se/leap/openvpn/FileSelectLayout.java b/src/se/leap/openvpn/FileSelectLayout.java
index 2ca4490d..ec5f3636 100644
--- a/src/se/leap/openvpn/FileSelectLayout.java
+++ b/src/se/leap/openvpn/FileSelectLayout.java
@@ -10,7 +10,7 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class FileSelectLayout extends LinearLayout implements OnClickListener {
diff --git a/src/se/leap/openvpn/FileSelectionFragment.java b/src/se/leap/openvpn/FileSelectionFragment.java
index 5bc981fe..80cb2c62 100644
--- a/src/se/leap/openvpn/FileSelectionFragment.java
+++ b/src/se/leap/openvpn/FileSelectionFragment.java
@@ -5,7 +5,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.TreeMap;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.app.AlertDialog;
import android.app.ListFragment;
diff --git a/src/se/leap/openvpn/GeneralSettings.java b/src/se/leap/openvpn/GeneralSettings.java
index 34657914..93e4818e 100644
--- a/src/se/leap/openvpn/GeneralSettings.java
+++ b/src/se/leap/openvpn/GeneralSettings.java
@@ -1,6 +1,7 @@
package se.leap.openvpn;
import java.io.File;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.os.Bundle;
import android.preference.Preference;
diff --git a/src/se/leap/openvpn/InlineFileTab.java b/src/se/leap/openvpn/InlineFileTab.java
index 40995ceb..9e8041c0 100644
--- a/src/se/leap/openvpn/InlineFileTab.java
+++ b/src/se/leap/openvpn/InlineFileTab.java
@@ -9,7 +9,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class InlineFileTab extends Fragment
{
diff --git a/src/se/leap/openvpn/LaunchVPN.java b/src/se/leap/openvpn/LaunchVPN.java
index 1df6be96..89f2d372 100644
--- a/src/se/leap/openvpn/LaunchVPN.java
+++ b/src/se/leap/openvpn/LaunchVPN.java
@@ -20,9 +20,9 @@ import java.io.IOException;
import java.util.Collection;
import java.util.Vector;
-import se.leap.leapclient.ConfigHelper;
-import se.leap.leapclient.EIP;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.ConfigHelper;
+import se.leap.bitmaskclient.EIP;
+import se.leap.bitmaskclient.R;
import android.app.Activity;
import android.app.AlertDialog;
@@ -106,7 +106,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener {
final String action = intent.getAction();
// If something wants feedback, they sent us a Receiver
- mReceiver = intent.getParcelableExtra(ConfigHelper.RECEIVER_TAG);
+ mReceiver = intent.getParcelableExtra(EIP.RECEIVER_TAG);
// If the intent is a request to create a shortcut, we'll do that and exit
@@ -285,7 +285,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener {
// User does not want us to start, so we just vanish (well, now we tell our receiver, then vanish)
Bundle resultData = new Bundle();
// For now, nothing else is calling, so this "request" string is good enough
- resultData.putString(ConfigHelper.REQUEST_TAG, EIP.ACTION_START_EIP);
+ resultData.putString(EIP.REQUEST_TAG, EIP.ACTION_START_EIP);
mReceiver.send(RESULT_CANCELED, resultData);
finish();
}
@@ -373,7 +373,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener {
// Tell whom-it-may-concern that we started VPN
Bundle resultData = new Bundle();
// For now, nothing else is calling, so this "request" string is good enough
- resultData.putString(ConfigHelper.REQUEST_TAG, EIP.ACTION_START_EIP);
+ resultData.putString(EIP.REQUEST_TAG, EIP.ACTION_START_EIP);
mReceiver.send(RESULT_OK, resultData);
finish();
diff --git a/src/se/leap/openvpn/LogWindow.java b/src/se/leap/openvpn/LogWindow.java
index abd1acd6..c3ce8424 100644
--- a/src/se/leap/openvpn/LogWindow.java
+++ b/src/se/leap/openvpn/LogWindow.java
@@ -1,7 +1,8 @@
package se.leap.openvpn;
import java.util.Vector;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
diff --git a/src/se/leap/openvpn/MainActivity.java b/src/se/leap/openvpn/MainActivity.java
index d33fd832..0a769b4d 100644
--- a/src/se/leap/openvpn/MainActivity.java
+++ b/src/se/leap/openvpn/MainActivity.java
@@ -1,7 +1,8 @@
package se.leap.openvpn;
import java.util.List;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.content.Intent;
import android.preference.PreferenceActivity;
diff --git a/src/se/leap/openvpn/NetworkSateReceiver.java b/src/se/leap/openvpn/NetworkSateReceiver.java
index 301803b6..777402b4 100644
--- a/src/se/leap/openvpn/NetworkSateReceiver.java
+++ b/src/se/leap/openvpn/NetworkSateReceiver.java
@@ -8,7 +8,7 @@ import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
import android.preference.PreferenceManager;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class NetworkSateReceiver extends BroadcastReceiver {
private int lastNetwork=-1;
diff --git a/src/se/leap/openvpn/OpenVPN.java b/src/se/leap/openvpn/OpenVPN.java
index 3ffc47cb..c6055abd 100644
--- a/src/se/leap/openvpn/OpenVPN.java
+++ b/src/se/leap/openvpn/OpenVPN.java
@@ -3,7 +3,8 @@ package se.leap.openvpn;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Vector;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.content.Context;
diff --git a/src/se/leap/openvpn/OpenVPNThread.java b/src/se/leap/openvpn/OpenVPNThread.java
index 3f9a0d91..0c383ab0 100644
--- a/src/se/leap/openvpn/OpenVPNThread.java
+++ b/src/se/leap/openvpn/OpenVPNThread.java
@@ -7,7 +7,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.LinkedList;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.util.Log;
import se.leap.openvpn.OpenVPN.LogItem;
diff --git a/src/se/leap/openvpn/OpenVpnManagementThread.java b/src/se/leap/openvpn/OpenVpnManagementThread.java
index 43d4f701..028c6ec7 100644
--- a/src/se/leap/openvpn/OpenVpnManagementThread.java
+++ b/src/se/leap/openvpn/OpenVpnManagementThread.java
@@ -17,7 +17,8 @@ import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.content.SharedPreferences;
import android.net.LocalServerSocket;
diff --git a/src/se/leap/openvpn/OpenVpnPreferencesFragment.java b/src/se/leap/openvpn/OpenVpnPreferencesFragment.java
index 31746332..190a48fe 100644
--- a/src/se/leap/openvpn/OpenVpnPreferencesFragment.java
+++ b/src/se/leap/openvpn/OpenVpnPreferencesFragment.java
@@ -2,7 +2,7 @@ package se.leap.openvpn;
import android.os.Bundle;
import android.preference.PreferenceFragment;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public abstract class OpenVpnPreferencesFragment extends PreferenceFragment {
diff --git a/src/se/leap/openvpn/OpenVpnService.java b/src/se/leap/openvpn/OpenVpnService.java
index 3ac80497..bec7dcee 100644
--- a/src/se/leap/openvpn/OpenVpnService.java
+++ b/src/se/leap/openvpn/OpenVpnService.java
@@ -5,8 +5,8 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Vector;
-import se.leap.leapclient.Dashboard;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.Dashboard;
+import se.leap.bitmaskclient.R;
import android.annotation.TargetApi;
import android.app.Notification;
@@ -161,7 +161,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
PendingIntent getLogPendingIntent() {
// Let the configure Button show the Dashboard
Intent intent = new Intent(Dashboard.getAppContext(),Dashboard.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent startLW = PendingIntent.getActivity(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
return startLW;
diff --git a/src/se/leap/openvpn/ProxyDetection.java b/src/se/leap/openvpn/ProxyDetection.java
index 7114857d..c7b3d196 100644
--- a/src/se/leap/openvpn/ProxyDetection.java
+++ b/src/se/leap/openvpn/ProxyDetection.java
@@ -8,7 +8,8 @@ import java.net.SocketAddress;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.List;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
public class ProxyDetection {
static SocketAddress detectProxy(VpnProfile vp) {
diff --git a/src/se/leap/openvpn/Settings_Authentication.java b/src/se/leap/openvpn/Settings_Authentication.java
index 00f4c08a..7824d790 100644
--- a/src/se/leap/openvpn/Settings_Authentication.java
+++ b/src/se/leap/openvpn/Settings_Authentication.java
@@ -11,7 +11,7 @@ import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.SwitchPreference;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class Settings_Authentication extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener, OnPreferenceClickListener {
diff --git a/src/se/leap/openvpn/Settings_Basic.java b/src/se/leap/openvpn/Settings_Basic.java
index f3510da9..014c71a1 100644
--- a/src/se/leap/openvpn/Settings_Basic.java
+++ b/src/se/leap/openvpn/Settings_Basic.java
@@ -39,8 +39,8 @@ import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.ToggleButton;
-import se.leap.leapclient.R.id;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
+import se.leap.bitmaskclient.R.id;
public class Settings_Basic extends Fragment implements View.OnClickListener, OnItemSelectedListener, Callback {
private static final int CHOOSE_FILE_OFFSET = 1000;
diff --git a/src/se/leap/openvpn/Settings_IP.java b/src/se/leap/openvpn/Settings_IP.java
index df2efb40..bb605937 100644
--- a/src/se/leap/openvpn/Settings_IP.java
+++ b/src/se/leap/openvpn/Settings_IP.java
@@ -6,7 +6,7 @@ import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceManager;
import android.preference.SwitchPreference;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class Settings_IP extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener {
private EditTextPreference mIPv4;
diff --git a/src/se/leap/openvpn/Settings_Obscure.java b/src/se/leap/openvpn/Settings_Obscure.java
index ffbce971..6ba98606 100644
--- a/src/se/leap/openvpn/Settings_Obscure.java
+++ b/src/se/leap/openvpn/Settings_Obscure.java
@@ -6,7 +6,7 @@ import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class Settings_Obscure extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener {
private CheckBoxPreference mUseRandomHostName;
diff --git a/src/se/leap/openvpn/Settings_Routing.java b/src/se/leap/openvpn/Settings_Routing.java
index 48c09ff0..3cbdac0f 100644
--- a/src/se/leap/openvpn/Settings_Routing.java
+++ b/src/se/leap/openvpn/Settings_Routing.java
@@ -4,7 +4,7 @@ import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class Settings_Routing extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener {
diff --git a/src/se/leap/openvpn/ShowConfigFragment.java b/src/se/leap/openvpn/ShowConfigFragment.java
index 9bce67a6..194f87d4 100644
--- a/src/se/leap/openvpn/ShowConfigFragment.java
+++ b/src/se/leap/openvpn/ShowConfigFragment.java
@@ -10,7 +10,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.R;
public class ShowConfigFragment extends Fragment {
diff --git a/src/se/leap/openvpn/VPNLaunchHelper.java b/src/se/leap/openvpn/VPNLaunchHelper.java
index 59303748..418cf7e9 100644
--- a/src/se/leap/openvpn/VPNLaunchHelper.java
+++ b/src/se/leap/openvpn/VPNLaunchHelper.java
@@ -4,7 +4,8 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.content.Context;
import android.content.Intent;
diff --git a/src/se/leap/openvpn/VPNPreferences.java b/src/se/leap/openvpn/VPNPreferences.java
index 81d854ce..e3052050 100644
--- a/src/se/leap/openvpn/VPNPreferences.java
+++ b/src/se/leap/openvpn/VPNPreferences.java
@@ -1,7 +1,8 @@
package se.leap.openvpn;
import java.util.List;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.app.AlertDialog;
import android.content.DialogInterface;
diff --git a/src/se/leap/openvpn/VPNProfileList.java b/src/se/leap/openvpn/VPNProfileList.java
index a7132c9e..0ef611df 100644
--- a/src/se/leap/openvpn/VPNProfileList.java
+++ b/src/se/leap/openvpn/VPNProfileList.java
@@ -3,7 +3,8 @@ package se.leap.openvpn;
import java.util.Collection;
import java.util.Comparator;
import java.util.TreeSet;
-import se.leap.leapclient.R;
+
+import se.leap.bitmaskclient.R;
import android.app.Activity;
import android.app.AlertDialog;
diff --git a/src/se/leap/openvpn/VpnProfile.java b/src/se/leap/openvpn/VpnProfile.java
index 2262f565..8eebb763 100644
--- a/src/se/leap/openvpn/VpnProfile.java
+++ b/src/se/leap/openvpn/VpnProfile.java
@@ -21,8 +21,10 @@ import java.util.Vector;
import org.spongycastle.util.io.pem.PemObject;
import org.spongycastle.util.io.pem.PemWriter;
-import se.leap.leapclient.ConfigHelper;
-import se.leap.leapclient.R;
+import se.leap.bitmaskclient.ConfigHelper;
+import se.leap.bitmaskclient.EIP;
+import se.leap.bitmaskclient.Provider;
+import se.leap.bitmaskclient.R;
import android.content.Context;
import android.content.Intent;
@@ -48,7 +50,7 @@ public class VpnProfile implements Serializable{
public static final int TYPE_USERPASS_KEYSTORE = 7;
// Don't change this, not all parts of the program use this constant
- public static final String EXTRA_PROFILEUUID = "se.leap.leapclient.profileUUID"; // TODO this feels wrong. See Issue #1494
+ public static final String EXTRA_PROFILEUUID = "se.leap.bitmaskclient.profileUUID"; // TODO this feels wrong. See Issue #1494
public static final String INLINE_TAG = "[[INLINE]]";
private static final String OVPNCONFIGFILE = "android.conf";
@@ -246,9 +248,9 @@ public class VpnProfile implements Serializable{
cfg+=insertFileData("cert",mClientCertFilename);
*/
// FIXME This is all we need...The whole switch statement can go...
- cfg+="<ca>\n"+ConfigHelper.getStringFromSharedPref(ConfigHelper.MAIN_CERT_KEY)+"\n</ca>\n";
- cfg+="<key>\n"+ConfigHelper.getStringFromSharedPref(ConfigHelper.KEY_KEY)+"\n</key>\n";
- cfg+="<cert>\n"+ConfigHelper.getStringFromSharedPref(ConfigHelper.CERT_KEY)+"\n</cert>\n";
+ cfg+="<ca>\n"+ConfigHelper.getStringFromSharedPref(Provider.CA_CERT)+"\n</ca>\n";
+ cfg+="<key>\n"+ConfigHelper.getStringFromSharedPref(EIP.PRIVATE_KEY)+"\n</key>\n";
+ cfg+="<cert>\n"+ConfigHelper.getStringFromSharedPref(EIP.CERTIFICATE)+"\n</cert>\n";
break;
case VpnProfile.TYPE_USERPASS_PKCS12: