diff options
author | Arne Schwabe <arne@rfc2549.org> | 2016-02-16 14:01:13 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2016-02-16 14:01:13 +0100 |
commit | 5c217e6d58163a930a720195e3e708f784ca527e (patch) | |
tree | 44c5edb7fafafa0ff6688beb20ab8ab04128120b /main/src/main/java/de/blinkt/openvpn | |
parent | c13357869c10a0fd97804f8963e770359cb00c10 (diff) |
Support OpenVPN 2.2 in profile generation (don't ask)
Diffstat (limited to 'main/src/main/java/de/blinkt/openvpn')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/VpnProfile.java | 12 | ||||
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java index fe282f33..f52a0ad7 100644 --- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -155,11 +155,14 @@ public class VpnProfile implements Serializable, Cloneable { public boolean mAllowedAppsVpnAreDisallowed = true; public String mProfileCreator; - /* Options no long used in new profiles */ + + public boolean mPushPeerInfo=false; + public static final boolean mIsOpenVPN22 = false; + + /* Options no longer used in new profiles */ public String mServerName = "openvpn.blinkt.de"; public String mServerPort = "1194"; public boolean mUseUdp = true; - public boolean mPushPeerInfo=false; public VpnProfile(String name) { mUuid = UUID.randomUUID(); @@ -302,7 +305,8 @@ public class VpnProfile implements Serializable, Cloneable { mConnectRetry = "5"; - cfg += "connect-retry " + mConnectRetry + "\n"; + if (!mIsOpenVPN22 || !mUseUdp) + cfg += "connect-retry " + mConnectRetry + "\n"; cfg += "resolv-retry 60\n"; @@ -509,7 +513,7 @@ public class VpnProfile implements Serializable, Cloneable { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean usesystemproxy = prefs.getBoolean("usesystemproxy", true); - if (usesystemproxy) { + if (usesystemproxy && !mIsOpenVPN22) { cfg += "# Use system proxy setting\n"; cfg += "management-query-proxy\n"; } diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 6f14325f..44426e97 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -452,7 +452,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { break;
default:
- Log.e(TAG, "Unkown needok command " + argument);
+ Log.e(TAG, "Unknown needok command " + argument);
return;
}
|