diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-12-12 19:46:10 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-12-12 19:46:10 +0000 |
commit | f214bb2115994cc6b4123f3d06db0452f17f2e99 (patch) | |
tree | 7a09094e169f4097ceb033204c171eba2a51ae59 /proxy.h | |
parent | First attempt at automatic proxy detection, (diff) | |
download | openvpn-f214bb2115994cc6b4123f3d06db0452f17f2e99.tar.xz |
Added --auto-proxy directive to auto-detect HTTP or SOCKS
proxy settings (currently Windows only).
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@850 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'proxy.h')
-rw-r--r-- | proxy.h | 37 |
1 files changed, 31 insertions, 6 deletions
@@ -25,11 +25,35 @@ #ifndef PROXY_H #define PROXY_H -#ifdef ENABLE_HTTP_PROXY - #include "buffer.h" #include "misc.h" +#ifdef GENERAL_PROXY_SUPPORT + +/* + * Return value for get_proxy_settings to automatically + * determine proxy information. + */ +struct auto_proxy_info_entry { + char *server; + int port; +}; + +struct auto_proxy_info { + struct auto_proxy_info_entry http; + struct auto_proxy_info_entry socks; +}; + +struct auto_proxy_info *get_proxy_settings (char **err, struct gc_arena *gc); + +#ifdef WIN32 +void show_win_proxy_settings (const int msglevel); +#endif /* WIN32 */ + +#endif /* GENERAL_PROXY_SUPPORT */ + +#ifdef ENABLE_HTTP_PROXY + /* HTTP CONNECT authentication methods */ #define HTTP_AUTH_NONE 0 #define HTTP_AUTH_BASIC 1 @@ -41,6 +65,7 @@ struct http_proxy_options { int port; bool retry; int timeout; + bool auth_retry; const char *auth_method_string; const char *auth_file; const char *http_version; @@ -55,9 +80,10 @@ struct http_proxy_info { }; struct http_proxy_info *new_http_proxy (const struct http_proxy_options *o, + struct auto_proxy_info *auto_proxy_info, struct gc_arena *gc); -void establish_http_proxy_passthru (struct http_proxy_info *p, +bool establish_http_proxy_passthru (struct http_proxy_info *p, socket_descriptor_t sd, /* already open to proxy */ const char *host, /* openvpn server remote */ const int port, /* openvpn server port */ @@ -67,7 +93,6 @@ void establish_http_proxy_passthru (struct http_proxy_info *p, uint8_t *make_base64_string2 (const uint8_t *str, int str_len, struct gc_arena *gc); uint8_t *make_base64_string (const uint8_t *str, struct gc_arena *gc); -bool get_http_proxy_settings (struct http_proxy_options *p, char **err, struct gc_arena *gc); +#endif /* ENABLE_HTTP_PROXY */ -#endif -#endif +#endif /* PROXY_H */ |