summaryrefslogtreecommitdiff
path: root/ics-openvpn-stripped/main
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-05-29 20:19:24 +0200
committerParménides GV <parmegv@sdf.org>2014-05-29 20:19:24 +0200
commite50339824809da28beabfaf9ecea7414c131cbfe (patch)
tree5a9ec35a0c6d9d77afcb98eb8d88d342116986e6 /ics-openvpn-stripped/main
parent2ee8fb46dc2b719426e9735ba4a80729f1edc1d8 (diff)
ics-openvpn receives ifconfig from the server.
Refactored AndroidManifest to include launchvpn and openvpnservice. Imported changes from ics-openvpn-upstream
Diffstat (limited to 'ics-openvpn-stripped/main')
-rw-r--r--ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/VpnProfile.java4
-rw-r--r--ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java8
-rw-r--r--ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java8
3 files changed, 18 insertions, 2 deletions
diff --git a/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
index afa70100..0596684c 100644
--- a/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
+++ b/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
@@ -725,8 +725,8 @@ public class VpnProfile implements Serializable {
//! Return an error if somethign is wrong
public int checkProfile(Context context) {
if (mAuthenticationType == TYPE_KEYSTORE || mAuthenticationType == TYPE_USERPASS_KEYSTORE) {
- if (mAlias == null)
- return R.string.no_keystore_cert_selected;
+ // if (mAlias == null)
+ // return R.string.no_keystore_cert_selected;
}
if (!mUsePull || mAuthenticationType == TYPE_STATICKEYS) {
diff --git a/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 378b6b92..32e5cabb 100644
--- a/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -26,6 +26,14 @@ 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<String,Vector<Vector<String>>> args) {
+ options = args;
+ }
+
public void parseConfig(Reader reader) throws IOException, ConfigParseError {
diff --git a/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java b/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
index 8281aed8..d7bb827e 100644
--- a/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/ics-openvpn-stripped/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
@@ -72,6 +72,14 @@ 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)