Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

CURL.SetOptionProxyType

Sets the type of the proxy.

Component Version macOS Windows Linux Server iOS SDK
CURL 2.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionProxyType"; curl; Value )   More

Parameters

Parameter Description Example
curl The CURL session handle. $curl
Value The proxy type. Pass number listed below, e.g. 1 for CURLPROXY_HTTP_1_0. 1

Result

Returns "OK" on success.

Description

Sets the type of the proxy.
Available options for this are CURLPROXY_HTTP (0), CURLPROXY_HTTP_1_0 (1), CURLPROXY_SOCKS4 (4), CURLPROXY_SOCKS5 (5), CURLPROXY_SOCKS4A (6) and CURLPROXY_SOCKS5_HOSTNAME (7). The HTTP type is default.

If you set proxy type to CURLPROXY_HTTP_1_0 (0), it will only affect how libcurl speaks to a proxy when CONNECT is used. The HTTP version used for "regular" HTTP requests is instead controlled with CURL.SetOptionHTTPVersion.

See also PROXYTYPE option in CURL manual.

Examples

Set Socks 5 proxy:

MBS( "CURL.SetOptionProxyType"; $curl; 5 )

See also

Blog Entries

Created 18th August 2014, last changed 4th February 2016


CURL.SetOptionProxyTransferMode - CURL.SetOptionProxyUsername

Feedback: Report problem or ask question.