|
Packit |
3ff1e7 |
/** @page proxy_support Proxy support
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@section libcurl Proxy connections with libcurl
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
libquvi uses libcurl for accessing the Internet.
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
See the @ref env for notes about libcurl supported proxy environment
|
|
Packit |
3ff1e7 |
variables. By default, libcurl will use the environment variable values
|
|
Packit |
3ff1e7 |
if they have been set.
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@section autoproxy Autoproxy with libproxy
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
libquvi may use libproxy to detect the system proxy settings,
|
|
Packit |
3ff1e7 |
and then set them to be used with libcurl. This feature is not enabled
|
|
Packit |
3ff1e7 |
by default, the application must set the @ref QUVI_OPTION_AUTOPROXY to
|
|
Packit |
3ff1e7 |
QUVI_TRUE to enable it.
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@section explicit Setting the proxy explicitly
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
If your application must set the proxy explicitly:
|
|
Packit |
3ff1e7 |
@li Query the libcurl handle from libquvi
|
|
Packit |
3ff1e7 |
@li Set the handle to use a new proxy address
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@code
|
|
Packit |
3ff1e7 |
quvi_get(q, QUVI_INFO_CURL_HANDLE, &c);
|
|
Packit |
3ff1e7 |
curl_easy_setopt(c, CURLOPT_PROXY, "http://foo:1234");
|
|
Packit |
3ff1e7 |
@endcode
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
Refer to the libcurl curl_easy_setopt C API reference documentation for
|
|
Packit |
3ff1e7 |
more details about using this option.
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@sa http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@section notes Notes
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@li Many desktop environments set the environment values (http_proxy,
|
|
Packit |
3ff1e7 |
https_proxy, all_proxy, etc.) for a UNIX shell automatically, so in
|
|
Packit |
3ff1e7 |
these cases, ideally, your application should not have to set anything
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@li Enabling @ref QUVI_OPTION_AUTOPROXY in GUI applications may be the
|
|
Packit |
3ff1e7 |
best option, unless your choose to set the proxy address explicitly as
|
|
Packit |
3ff1e7 |
decribed above (@ref explicit)
|
|
Packit |
3ff1e7 |
|
|
Packit |
3ff1e7 |
@sa http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTVERBOSE
|
|
Packit |
3ff1e7 |
*/
|