summaryrefslogtreecommitdiff
path: root/src/de/blinkt
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
commit8b03c9659ff176fa816c8a42d96b986ec0ff17bd (patch)
treea6b835c328f26fae4e7f1acd5be07158ec09e216 /src/de/blinkt
parent56e466e15d21530fb67ebf01514f85a8e5aa170a (diff)
Fix parsing of tcp6 and udp6. Also parse connect-retry(-max). (Closes issue #69)
Diffstat (limited to 'src/de/blinkt')
-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){