GNURLOPT_PROXYTYPE(3)
π GNURLOPT_PROXYTYPE(3) β the proxy-protocol-type girly π
okay so bestie, welcome to the gnurl curl_easy_setopt options page β¨ this is GNURLOPT_PROXYTYPE(3) and it's literally all about telling gnurl what kind of proxy you're talking to. no cap, that's the whole vibe. π¦
β¨ NAME β¨
CURLOPT_PROXYTYPE β the proxy protocol type, periodt π
π SYNOPSIS π
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYTYPE, long type);
πΈ DESCRIPTION πΈ
okay so you pass one of the values below to type and that sets the type of the proxy π
like, which flavour of proxy your handle is gonna talk to. pick your fighter:
CURLPROXY_HTTPβ HTTP Proxy. this one's the Default, she's the main character πCURLPROXY_HTTPSβ HTTPS Proxy. (Added in 7.52.0 for OpenSSL, GnuTLS and NSS) π₯CURLPROXY_HTTP_1_0β HTTP 1.0 Proxy. this is very similar toCURLPROXY_HTTPexcept it uses HTTP/1.0 for any CONNECT tunnelling. it does not change the HTTP version of the actual HTTP requests, those are controlled byCURLOPT_HTTP_VERSION(3). so don't get it twisted bestie π«ΆCURLPROXY_SOCKS4β SOCKS4 Proxy. π§¦CURLPROXY_SOCKS4Aβ SOCKS4a Proxy. Proxy resolves URL hostname. π§¦β¨CURLPROXY_SOCKS5β SOCKS5 Proxy. π§¦πCURLPROXY_SOCKS5_HOSTNAMEβ SOCKS5 Proxy. Proxy resolves URL hostname. π§¦πΊ
ngl, often it is more convenient to specify the proxy type with the scheme part of the CURLOPT_PROXY(3) string. iykyk π
π¦ DEFAULT π¦
CURLPROXY_HTTP
(the default ate, no notes ππ)
π PROTOCOLS π
Most
β EXAMPLE β
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080");
/* set the proxy type */
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
look at her go ππ set the URL, set the proxy, set the type (SOCKS5 up in here), perform, cleanup β chef's kiss π
π₯ AVAILABILITY π₯
Always
(like, always always. she's been here the whole time π )
π RETURN VALUE π
Returns CURLE_OK
π«Ά SEE ALSO π«Ά
k bye bestie, go set some proxy types πβ¨ this was libcurl 7.37.0, dated 17 Jun 2014, signing off ππ¦π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms