summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2010-10-11 00:56:04 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-12 21:43:43 +0100
commitfc1fa9ffc7e3356458ec38d43816e5ddeb0c580a (patch)
tree8075e63066811c03ab4daf20c9519b8fbf43fb26 /options.c
parent031d18fcb8a2a552aecabb41f1afdfe3f51bdd58 (diff)
downloadopenvpn-fc1fa9ffc7e3356458ec38d43816e5ddeb0c580a.tar.gz
openvpn-fc1fa9ffc7e3356458ec38d43816e5ddeb0c580a.tar.xz
openvpn-fc1fa9ffc7e3356458ec38d43816e5ddeb0c580a.zip
Adding support for SOCKS plain text authentication
This patch adds support for SOCKS plain text (username/password) authentication as described in RFC 1929. It adds an optional third parameter to the socks-proxy option, which is a file containing the login credentials. I've been using this patch for two weeks now and it does not seem to cause any problem. The only modifications are in the SOCKS handshake handling and the options parser. Signed-Off-By: Pierre Bourdon <delroth@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <dazo@users.sourceforge.net> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'options.c')
-rw-r--r--options.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/options.c b/options.c
index ea2dcbe..15a1d62 100644
--- a/options.c
+++ b/options.c
@@ -120,8 +120,11 @@ static const char usage_message[] =
" AGENT user-agent\n"
#endif
#ifdef ENABLE_SOCKS
- "--socks-proxy s [p]: Connect to remote host through a Socks5 proxy at address\n"
- " s and port p (default port = 1080).\n"
+ "--socks-proxy s [p] [up] : Connect to remote host through a Socks5 proxy at\n"
+ " address s and port p (default port = 1080).\n"
+ " If proxy authentication is required,\n"
+ " up is a file containing username/password on 2 lines, or\n"
+ " 'stdin' to prompt for console.\n"
"--socks-proxy-retry : Retry indefinitely on Socks proxy errors.\n"
#endif
"--resolv-retry n: If hostname resolve fails for --remote, retry\n"
@@ -4283,6 +4286,7 @@ add_option (struct options *options,
options->ce.socks_proxy_port = 1080;
}
options->ce.socks_proxy_server = p[1];
+ options->ce.socks_proxy_authfile = p[3]; /* might be NULL */
}
else if (streq (p[0], "socks-proxy-retry"))
{