summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/ConfigParser.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-02 21:40:41 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-02 21:40:41 +0200
commitd4a1b52faa85df4446560a48c6bcc57f016e0c3c (patch)
tree68f047d19b393ff7c9fc0b6e38c96d14cd1770c3 /src/de/blinkt/openvpn/ConfigParser.java
parent43ee0308b1b866a45437c0e27d91c2c96b515d87 (diff)
Import User and Password from auth-user-file if it exists. (closes #issue 42)
Diffstat (limited to 'src/de/blinkt/openvpn/ConfigParser.java')
-rw-r--r--src/de/blinkt/openvpn/ConfigParser.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java
index 44af2cdc..b897f63a 100644
--- a/src/de/blinkt/openvpn/ConfigParser.java
+++ b/src/de/blinkt/openvpn/ConfigParser.java
@@ -225,6 +225,7 @@ public class ConfigParser {
"persist-tun",
"persist-key",
"register-dns",
+ "route-delay",
"route-gateway",
"route-metric",
"route-method",
@@ -424,14 +425,20 @@ public class ConfigParser {
if(getOption("nobind", 0, 0) != null)
np.mNobind=true;
- if(getOption("auth-user-pass",0,1) != null) {
+ Vector<String> authuser = getOption("auth-user-pass",0,1);
+ if(authuser !=null){
+
if(noauthtypeset) {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS;
} else if(np.mAuthenticationType==VpnProfile.TYPE_CERTIFICATES) {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS_CERTIFICATES;
} else if(np.mAuthenticationType==VpnProfile.TYPE_KEYSTORE) {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS_KEYSTORE;
- }
+ }
+ if(authuser.size()>1) {
+ np.mName=authuser.get(1);
+ }
+
}