CURL.SetOptionProxyType
-----------------------

Sets the type of the proxy.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionProxyType"; curl; Value ) 

**MBS**( **"CURL.SetOptionProxyType";** /\* Sets the type of the proxy. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The proxy type. Pass number listed below, e.g. 1 for CURLPROXY\_HTTP\_1\_0.e.g. 1 \*/ 

### 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](CURLSetOptionHTTPVersion.md).  
See also [PROXYTYPE](https://curl.haxx.se/libcurl/c/CURLOPT_PROXYTYPE.html) option in CURL manual.

### Examples

Set Socks 5 proxy:

 MBS ( "CURL.SetOptionProxyType"; $curl ; 5 )  
### See also

- [CURL.SetOptionHTTPVersion](CURLSetOptionHTTPVersion.md)
- [CURL.SetOptionProxy](CURLSetOptionProxy.md)
- [CURL.SetOptionProxyAuth](CURLSetOptionProxyAuth.md)
- [CURL.SetOptionProxyCAInfo](CURLSetOptionProxyCAInfo.md)
- [CURL.SetOptionProxyCRLFile](CURLSetOptionProxyCRLFile.md)
- [CURL.SetOptionProxyHeader](CURLSetOptionProxyHeader.md)
- [CURL.SetOptionProxyPort](CURLSetOptionProxyPort.md)
- [CURL.SetOptionProxySSLKey](CURLSetOptionProxySSLKey.md)
- [CURL.SetOptionProxySSLKeyType](CURLSetOptionProxySSLKeyType.md)
- [CURL.SetOptionSSLKeyType](CURLSetOptionSSLKeyType.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

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

  
[CURL.SetOptionProxyTransferMode](CURLSetOptionProxyTransferMode.md) - [CURL.SetOptionProxyUsername](CURLSetOptionProxyUsername.md)

[HTML Version](CURLSetOptionProxyType.shtml)