Req #19332 [Fbk]: Add proxy type in cURL adapter

From: Date: Fri, 16 Mar 2012 15:21:57 +0000
Subject: Req #19332 [Fbk]: Add proxy type in cURL adapter
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8408@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19332&edit=1 ID: 19332 Updated by: borz_off@cs.msu.su Reported By: till at php dot net Summary: Add proxy type in cURL adapter Status: Feedback Type: Feature/Change Request Package: HTTP_Request2 Operating System: n/a PHP Version: Irrelevant Roadmap Versions: New Comment: Because. I won't. Previous Comments: ------------------------------------------------------------------------ [2012-03-16 11:27:16] doconnor Out of curiosity, why are you against specialisation in certain adapters? Or would you be more comfortable with a HTTP_Request2_CurlProxyAdapter that is obviously specialised? ------------------------------------------------------------------------ [2012-03-15 15:16:02] avb Too briefly, I should say. Socket adapter does not use 'http' transport, it is a pure PHP implementation of HTTP protocol. ------------------------------------------------------------------------ [2012-03-15 11:44:39] till I briefly looked at the socket adapeter but didn't dive into it. I know that stream_context_create() supports a proxy directive: http://www.php.net/manual/en/context.http.php I'm not sure what kind of proxy this is though. It seems like it's a simple tcp transport, so it could be socks5 too but I haven't tried it. I'll try to remember when I get to work to write a test script. Till ------------------------------------------------------------------------ [2012-03-15 08:31:01] avb -Status: Open +Status: Feedback I don't want to add features that are supported by one adapter only. Can you estimate what will it take to add SOCKS support to Socket adapter? ------------------------------------------------------------------------ [2012-03-15 01:29:57] till Description: ------------ cURL supports HTTP and socks5 proxies. This patch adds this feature to the adapter: https://gist.github.com/2040668 A new configuration value: proxy_type Supported values: 'http', 'socks5'. Throws exceptions in case un-supported value is passed or the version of cURL doesn't support it. Version number was taken from the PHP manual: http://docs.php.net/manual/en/function.curl-setopt.php (see CURLOPT PROXYTYPE) Let me know what you think. Till ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19332&edit=1

« previous php.pear.bugs (#8408) next »