diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-10-09 20:18:52 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-10-09 20:18:52 +0000 |
commit | 7dbf6935b36ef6929f44ba277b1b569e780b96c7 (patch) | |
tree | e12ba5bf23a8a68cbaa75c36c0a50dfa98cb32ad /src/ne_session.h | |
parent | dc9a3704bfc313991c54ba985e344d3ee88b4168 (diff) | |
download | neon-7dbf6935b36ef6929f44ba277b1b569e780b96c7.tar.gz |
Add support for configuring a SOCKS proxy for the HTTP session:
* src/ne_request.c (open_connection): Fix non-proxy error path.
Establish connection via SOCKS proxy.
* src/ne_session.c (ne_session_socks_proxy): New function.
* src/ne_session.h (ne_session_socks_proxy): New prototype.
* src/ne_private.h (struct ne_session_s): Add socks_ver, socks_user,
socks_password fields.
* test/request.c (socks_session, socks_proxy): New functions.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1559 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_session.h')
-rw-r--r-- | src/ne_session.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ne_session.h b/src/ne_session.h index 072d9d1..63b1ce9 100644 --- a/src/ne_session.h +++ b/src/ne_session.h @@ -53,6 +53,21 @@ void ne_close_connection(ne_session *sess); void ne_session_proxy(ne_session *sess, const char *hostname, unsigned int port); +/* Configure a SOCKS proxy server which will be used for the session. + * The SOCKS protocol version 'vers' will be used to contact the + * proxy at given 'hostname' and 'port'. + * + * If SOCKSv4 or v4a are used, username must be non-NULL. For v5, + * username may be NULL, in which case, password is ignored. If + * username is non-NULL, password must also be non-NULL. + * + * This function will override (remove) any proxy servers previously + * configured, and must be called before any requests are created + * using this session. */ +void ne_session_socks_proxy(ne_session *sess, enum ne_sock_sversion vers, + const char *hostname, unsigned int port, + const char *username, const char *password); + /* Defined session flags: */ typedef enum ne_session_flag_e { NE_SESSFLAG_PERSIST = 0, /* disable this flag to prevent use of |