summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/VpnProfile.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-09-13 01:42:20 +0200
committerArne Schwabe <arne@rfc2549.org>2012-09-13 01:42:20 +0200
commit93213caa1c1456836dc0f9d2ade45eed1a3d4e4a (patch)
tree2e5dfc3557e2cd6d2093db9b30839e1fd93e87e6 /src/de/blinkt/openvpn/VpnProfile.java
parenteec4659b127c69a5005be439efad148e98648c69 (diff)
Add support for persist-tun option (closes issue #83)
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index afb779d2..404072b1 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -101,6 +101,7 @@ public class VpnProfile implements Serializable{
public String mKeyPassword="";
static final String MINIVPN = "miniopenvpn";
+ public boolean mPersistTun = true;
public void clearDefaults() {
@@ -110,6 +111,7 @@ public class VpnProfile implements Serializable{
mUseDefaultRoute=false;
mUseDefaultRoutev6=false;
mExpectTLSCert=false;
+ mPersistTun = false;
}
@@ -337,6 +339,9 @@ public class VpnProfile implements Serializable{
if(mUseFloat)
cfg+= "float\n";
+ if(mPersistTun)
+ cfg+= "persist-tun\n";
+
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean usesystemproxy = prefs.getBoolean("usesystemproxy", true);
if(usesystemproxy) {