Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using krakenex with a proxy/ behind a proxy #6

Closed
wwender opened this issue Mar 2, 2017 · 6 comments
Closed

Using krakenex with a proxy/ behind a proxy #6

wwender opened this issue Mar 2, 2017 · 6 comments
Milestone

Comments

@wwender
Copy link

wwender commented Mar 2, 2017

Currently krakenex will not work with a proxy/behind a proxy without code change cause it's https requests are based on http.client and urllib.

Best would be to have it based on requests. There the system/OS proxy settings are automatically used.

What I did for krakenex was to change the connection.py. With a proxy at : myserver:1111 it has to be changed from
self.conn = http.client.HTTPSConnection(uri, timeout = timeout)

to

self.conn = http.client.HTTPSConnection("myserver:1111", timeout = timeout)
self.conn.set_tunnel(uri)

@veox
Copy link
Owner

veox commented Mar 4, 2017

Didn't dwell too much yet, but this does seem to be a more valid reason than #2.

@veox veox added this to the 0.2 milestone Mar 4, 2017
@veox veox modified the milestones: v1.0, v0.2 Mar 27, 2017
@veox veox modified the milestones: v2.0, v1.0 Jun 12, 2017
@veox
Copy link
Owner

veox commented Jul 31, 2017

PR #36 implements this on current master.

@ScriptProdigy
Copy link

@veox if I may ask, why the choice for urllib and http.client over requests? To stay more to standard python libs? Or is there another technical reason you saw? Maybe just personal preference, I personally would have used requests out of preference, though not a problem. Saw this issue browsing and thought it interesting is all.

@veox
Copy link
Owner

veox commented Sep 2, 2017

"No dependencies" was the main reason, yes.

@ScriptProdigy
Copy link

Thanks for the quick reply, fair enough :) Thanks for creating this lib, works swell :D

@veox veox closed this as completed in c9b87b5 Sep 21, 2017
@veox
Copy link
Owner

veox commented Sep 21, 2017

requests-updated has been merged to master. Also released v2.0.0a1 (alpha).

veox pushed a commit that referenced this issue Sep 12, 2018
Merge current master into ENH_requests-retry-2 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants