php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53543 Add "CURLOPT_NOPROXY" to curl_setopts()
Submitted: 2010-12-14 15:56 UTC Modified: 2012-07-26 23:21 UTC
From: benvercammen at gmail dot com Assigned: pierrick (profile)
Status: Closed Package: cURL related
PHP Version: Irrelevant OS: Windows XP (probably all OS'es)
Private report: No CVE-ID: None
 [2010-12-14 15:56 UTC] benvercammen at gmail dot com
Description:
------------
First of all, this isn't a bug but a feature request. I know it's one that shouldn't be necessary to be implemented under normal conditions, but here's my case...

For some strange reason, while using cURL on my machine, it always tries to go via proxy localhost:5865. I checked with some other people and they don't have the issue. Still, this is what I get:

C:\curl>curl google.com -v
* About to connect() to proxy localhost port 5865 (#0)
*   Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host


This is easily circumvented by adding "--noproxy google.com" to the command, as cURL won't be looking for a proxy anymore. However, using the PHP cURL functions, there seems to be no way to add that option to the command. Even if I don't set any proxy via curl_setopt(), cURL will still try to use the localhost proxy, which still results in the "couldn't connect to host" error...

So, that's why I'd like to see the "CURLOPT_NOPROXY" option added to the PHP curl functions. Is there any chance of this being implemented in a near release, or are there other workarounds I may not have thought of?

(Check http://curl.haxx.se/changes.html#7_19_4 for the release note)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-22 08:34 UTC] pierrick@php.net
-Assigned To: +Assigned To: pierrick
 [2011-11-23 05:32 UTC] pierrick@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Added with many other new CURLOPT_* in trunk
 [2011-11-23 05:32 UTC] pierrick@php.net
-Status: Assigned +Status: To be documented
 [2012-07-26 23:21 UTC] pierrick@php.net
-Status: Open +Status: Closed
 [2012-07-26 23:21 UTC] pierrick@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

CURLOPT_NOPROXY was added on the master branch.
 [2013-10-02 15:11 UTC] tgabi333 at gmail dot com
It seems to me there is no documentation about CURLOPT_NOPROXY
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC