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
HTTPS proxy support (issue #50) #139
Conversation
…st: header issue.
This looks very interesting, thank you! I'm going to try and take a closer look at it over the next couple of weeks. Please bug me if I'm taking too long. Things have been busy lately. :) |
@wolever is going to take a closer look at this for me. :) |
First, as of 4a5f5f7, there is one failing test:
|
@@ -96,6 +96,11 @@ def connect(self): | |||
# Add certificate verification | |||
sock = socket.create_connection((self.host, self.port), self.timeout) | |||
|
|||
if self._tunnel_host: | |||
self.sock = sock | |||
self._tunnel() # calls self._set_hostport(), so self.host is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these "inline" comments above:
# calls self._set_hostport() …
# …
self._tunnel()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, sentence-case please. :)
# Calls `self._set_hostport()`, ...
One bug: it looks like the ProxyManager fails when no port is specified in the URL:
|
Tiny bug: This actually might actually exist in master too and might not have been introduced by this branch, but either way this would be a good place to fix it. If you comment out Easiest fix, in my opinion: change line 560 in |
@stanvit If you do a rebase the Travis build will be triggered. |
@schlamar, I probably will need some assistance with rebasing, I couldn't make it properly. Every change seems to be applied twice (due the previous rebase, I guess I should have squashed them) and it will probably result in doubling all commits from https-proxy branch again. |
Mhh, that is strange. Could it be that you did the first rebase against upstream/master and the second against origin/master? Usually a second rebase against master should be fine. However, I'm no git expert... |
I merged against master: stanvit#5 |
How I did this: I cherry-picked your first rebase to the master revision at that time (4ff6c97) and then did a clean rebase against master:
|
Thank you all for continuing to hammer this out. :) |
@schlamar , thank you very much, I'll look at that tomorrow, I was pretty busy lately. |
Everything looks good, assuming all tests pass after the recent SSL changes in master. Also eagerly awaiting the approval of this, so I can make my official pull for SOCKS support on top of this. |
This would be great to get merged in if it's passing tests now. |
Bump |
Any brave champions want to shepherd this poor issue from the wilderness? |
+1 on getting this merged as soon as possible. @shazow What it looks like your keen contributors need is your leadership and a clear list of exactly what is left to be addressed so that everyone who's interested can swarm on getting it finished and finally start enjoying it. Let's not let the recent activity and interest wane again. Clear goals! GO GO GO! |
Thank you, @shlamar . Could you please list the goals that, in your opinion, will lead to the PR acceptance? |
Added a list to #170, no guarantee for completeness though :) |
A recommendation: can we keep the conversation in either this PR or the rebased one in #170? The conversation is difficult to follow when it's in two places. =) |
👍 This is exactly what I wanted to say in my previous comment (#139 (comment)). |
Closing this PR to avoid confusion. |
This Pull Request resolves #50 adding HTTPS (CONNECT) proxy support to ProxyManager with minimal API and code changes.
A short summary of the changes:
All tests run fine with Python 2.6, 2.7 and 3.2 on Mac OS 10.7.5, except for sporadic timeouts and SSL errors that occur against the unpatched library as well (and should be fixed separately). The code doesn't introduce any new regressions.
Possible TODOs and improvements: