couchdb-python icon indicating copy to clipboard operation
couchdb-python copied to clipboard

Support HTTP proxy

Open djc opened this issue 10 years ago • 8 comments

From chadmill on June 18, 2010 22:39:19

Any HTTP-based protocol should have an API that permits inserting HTTP proxy information.

Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=135

djc avatar Jul 12 '14 14:07 djc

From chadmill on June 18, 2010 13:39:49

Darn, I can't assign this to myself.

djc avatar Jul 12 '14 14:07 djc

From chadmill on June 18, 2010 13:54:52

First attempt at support.

Attachment: python-couchdb-bug135.patch

djc avatar Jul 12 '14 14:07 djc

From djc.ochtman on December 22, 2010 01:12:43

Would it be possible to mock up some proxy server to we can test this?

djc avatar Jul 12 '14 14:07 djc

From [email protected] on February 19, 2014 11:15:52

Hi Dirkjan, I have a new patch for this that is battle tested. I can also provide testing information. If you are willing to do an official 0.9.1 / 0.10.0 for this feature I'd love to contribute it.

Let me know, Joan (@wohali / freenode Wohali)

djc avatar Jul 12 '14 14:07 djc

From djc.ochtman on February 19, 2014 11:45:38

Yes, please, can you attach the patch here!

djc avatar Jul 12 '14 14:07 djc

From [email protected] on February 19, 2014 13:32:19

Here is the unified patch.


Testing approach:

  1. Install Java and browsermob-proxy from http://bmp.lightbody.net/ .

  2. On any UNIX, run browsermob-proxy and configure a proxy at port 9091 via:

    /path/to/browsermob-proxy -po 9090 >~/proxy.log.$$ 2>&1 & curl -X POST -d "port=9091" http://localhost:9090/proxy >/dev/null 2>&1

  3. Test script:

server = Server(proxy_settings={"port": "9091"}) # http and localhost are defaulted db = server.create('python-tests') ...

  1. Validate with ~/proxy.log. that all expected requests went through the web proxy, not direct.

Please let me know ASAP if there are any problems you encounter, I am highly motivated to help you get a point release out with this patch ;)

Attachment: couchdb-proxy.patch

djc avatar Jul 12 '14 14:07 djc

Has there been any progress on this? I would like to specify a proxy so that I can use Fiddler to study my the traffic generated by my CouchDB/Python application. I think that this cannot be done without proxy support.

gdelfino avatar Nov 30 '17 14:11 gdelfino

There has been no progress on this. Unfortunately, I'm also no longer actively maintaining couchdb-python. Consider using https://github.com/cloudant/python-cloudant instead (unless you're interested in taking over maintainership).

djc avatar Nov 30 '17 14:11 djc