Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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