summaryrefslogtreecommitdiff
path: root/src/de
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-12-16 10:39:29 +0100
committerArne Schwabe <arne@rfc2549.org>2012-12-16 10:39:29 +0100
commita5c9cda1a3841d2988ec76c7241ea955c3d36f45 (patch)
tree6f7a632c6fe741a3cb75caa1a43e5eb0a33a88c1 /src/de
parent3a42093ba277e1195c889291a6c5bd9326ecf254 (diff)
Fix parsing of tcp6 and udp6. Also parse connect-retry(-max). (Closes issue #69)
Diffstat (limited to 'src/de')
-rw-r--r--src/de/blinkt/openvpn/ConfigParser.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java
index 1098058f..826f3b62 100644
--- a/src/de/blinkt/openvpn/ConfigParser.java
+++ b/src/de/blinkt/openvpn/ConfigParser.java
@@ -353,10 +353,12 @@ public class ConfigParser {
Vector<String> proto = getOption("proto", 1,1);
if(proto!=null){
- if(proto.get(1).equals("udp"))
+ if(proto.get(1).equals("udp") || proto.get(1).equals("udp6"))
np.mUseUdp=true;
else if (proto.get(1).equals("tcp-client") ||
- proto.get(1).equals("tcp"))
+ proto.get(1).equals("tcp") ||
+ proto.get(1).equals("tcp6") ||
+ proto.get(1).endsWith("tcp6-client"))
np.mUseUdp=false;
else
throw new ConfigParseError("Unsupported option to --proto " + proto.get(1));
@@ -439,6 +441,15 @@ public class ConfigParser {
if(getOption("persist-tun", 0,0) != null)
np.mPersistTun=true;
+ Vector<String> connectretry = getOption("connect-retry", 1, 1);
+ if(connectretry!=null)
+ np.mConnectRetry =connectretry.get(1);
+
+ Vector<String> connectretrymax = getOption("connect-retry-max", 1, 1);
+ if(connectretrymax!=null)
+ np.mConnectRetryMax =connectretrymax.get(1);
+
+
Vector<String> authuser = getOption("auth-user-pass",0,1);
if(authuser !=null){