summaryrefslogtreecommitdiff
path: root/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 42217e52..ce490c31 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -328,7 +328,6 @@ public class ConfigParser {
"socks-proxy",
"socks-proxy-retry",
"explicit-exit-notify",
- "mssfix"
};
@@ -465,6 +464,18 @@ public class ConfigParser {
}
+ Vector<String> tunmtu = getOption("mtu", 1, 1);
+
+ if (tunmtu != null) {
+ try {
+ np.mTunMtu = Integer.parseInt(tunmtu.get(1));
+ } catch (NumberFormatException e) {
+ throw new ConfigParseError("Argument to --tun-mtu has to be an integer");
+ }
+ }
+
+
+
Vector<String> mode = getOption("mode", 1, 1);
if (mode != null) {
if (!mode.get(1).equals("p2p"))
@@ -635,6 +646,19 @@ public class ConfigParser {
}
}
+ Vector<String> authretry = getOption("auth-retry", 1, 1);
+ if (authretry != null) {
+ if (authretry.get(1).equals("none"))
+ np.mAuthRetry = VpnProfile.AUTH_RETRY_NONE_FORGET;
+ else if (authretry.get(1).equals("nointeract"))
+ np.mAuthRetry = VpnProfile.AUTH_RETRY_NOINTERACT;
+ else if (authretry.get(1).equals("interact"))
+ np.mAuthRetry = VpnProfile.AUTH_RETRY_NOINTERACT;
+ else
+ throw new ConfigParseError("Unknown parameter to auth-retry: " + authretry.get(2));
+ }
+
+
Vector<String> crlfile = getOption("crl-verify", 1, 2);
if (crlfile != null) {
// If the 'dir' parameter is present just add it as custom option ..