From: Michael Wallner Date: Mon, 1 Mar 2021 15:14:09 +0000 (+0100) Subject: add curl request option socks5_auth X-Git-Tag: v4.1.0~30 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=29787e5fe36d435725aabdaa122679ab411909c2;p=m6w6%2Fext-http add curl request option socks5_auth --- diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index de8bc20..4882500 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1203,6 +1203,9 @@ static void php_http_curle_options_init(php_http_options_t *registry) #if PHP_HTTP_CURL_VERSION(7,19,4) php_http_option_register(registry, ZEND_STRL("noproxy"), CURLOPT_NOPROXY, IS_STRING); #endif +#if PHP_HTTP_CURL_VERSION(7,55,0) + php_http_option_register(registry, ZEND_STRL("socks5_auth"), CURLOPT_SOCKS5_AUTH, IS_LONG); +#endif #if PHP_HTTP_CURL_VERSION(7,37,0) if ((opt = php_http_option_register(registry, ZEND_STRL("proxyheader"), CURLOPT_PROXYHEADER, IS_ARRAY))) { @@ -2626,6 +2629,7 @@ PHP_MINIT_FUNCTION(http_client_curl) /* * Auth Constants */ + REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_NONE", CURLAUTH_NONE, CONST_CS|CONST_PERSISTENT); REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_BASIC", CURLAUTH_BASIC, CONST_CS|CONST_PERSISTENT); REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_DIGEST", CURLAUTH_DIGEST, CONST_CS|CONST_PERSISTENT); #if PHP_HTTP_CURL_VERSION(7,19,3)