From 05ac2dc5c77fa4b87e98508c1b15fd254806b1ce Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 27 Nov 2015 11:54:52 +0100 Subject: New feature to test for SOCKS5 proxy availability. * src/assuan-socket.c (socks5_connect): Add special treatment for empty hostnames. (_assuan_sock_connect_byname): Add feature to test for proxy availibility. * tests/socks5.c (main): Add option --have-proxy. Signed-off-by: Werner Koch --- doc/assuan.texi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/assuan.texi b/doc/assuan.texi index 131ffc1..aae3de7 100644 --- a/doc/assuan.texi +++ b/doc/assuan.texi @@ -1995,7 +1995,12 @@ current implementation requires that @var{flags} has either new TCP STREAM socket is returned; on error @code{ASSUAN_INVALID_FD} and ERRNO set. If @var{credentials} is not @code{NULL}, it is a string used for password based SOCKS authentication. Username and -password are separated by a colon. @var{reserved} should be 0. +password are separated by a colon. @var{reserved} should be 0. To +test whether the proxy is available @var{host} and @var{port} may be +given as NULL/0: If the proxy is available the function returns a +valid socket which is in the state after credentials sub-negotiation. +The caller now knows that the SOCKS proxy is available and has been +authenticated; normally the caller closes the socket then. @end deftypefun -- cgit v1.2.1