Meet us at at Real World in Orlando, Florida.

All functions   Mac OS X   Windows   Crossplatform   Components   Guides  
New in version: 2.0   2.1   2.2   2.3   2.4   2.5   2.6   2.7   2.8  

CURL.SetOptionProxy

Component: CURL
Version: 2.5
Mac OS X: Works
Windows: Works

MBS( "CURL.SetOptionProxy"; handle; value )

Parameters

Parameter Description Example value
Handle The CURL session handle. $curl
Value The proxy string "http://cache.local.com/:8000"

Result

Returns "OK" on success.

Description

Set HTTP proxy to use.
The parameter should be a text string holding the host name or dotted IP address. To specify port number in this string, append :[port] to the end of the host name. The proxy string may be prefixed with [protocol]:// since any such prefix will be ignored. The proxy's port number may optionally be specified with the separate option. If not specified, libcurl will default to using port 1080 for proxies. see also CURL.SetOptionProxyPort.

When you tell the library to use an HTTP proxy, libcurl will transparently convert operations to HTTP even if you specify an FTP URL etc. This may have an impact on what other features of the library you can use, such as CURL.SetOptionQuote and similar FTP specifics that don't work unless you tunnel through the HTTP proxy. Such tunneling is activated with CURL.SetOptionHTTPProxyTunnel.

libcurl respects the environment variables http_proxy, ftp_proxy, all_proxy etc, if any of those are set. The CURL.SetOptionProxy option does however override any possibly set environment variables.

Setting the proxy string to "" (an empty string) will explicitly disable the use of a proxy, even if there is an environment variable set for it.

Since 7.14.1, the proxy host string given in environment variables can be specified the exact same way as the proxy can be set with CURL.SetOptionProxy, include protocol prefix (http://) and embedded user + password.

Since 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or socks5h:// (the last one to enable socks5 and asking the proxy to do the resolving, also known as CURLPROXY_SOCKS5_HOSTNAME type) to request the specific SOCKS version to be used. No protocol specified, http:// and all others will be treated as HTTP proxies.

Feedback: Report problem or ask question.




Links
MBS Real Studio Plugins - Nachhilfe in Kretz