Repository navigation
Add support for https proxies - #80
Conversation
|
Although the tests pass, implementation is still a bit ugly. I'll revise this if there is demand for this feature |
|
Even though using a proxy in a high-performance WebSocket setup feels like a crime to me, this would still be interesting as a |
|
Yes, indeed, would be nice to have it. I'll revisit this branch |
Merging this PR will improve performance by ×2.5
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_bench_echo[64] |
1,101.3 ms | 339.2 ms | ×3.2 |
| ⚡ | test_bench_echo[8192] |
1,415 ms | 533.4 ms | ×2.7 |
| ⚡ | test_bench_echo[32768] |
2 s | 1.1 s | +72.69% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing feature/https_proxy_support (55811c8) with master (1480d58)
|
Currently
Unfortunately, this approach doesn't work with HTTPS proxies, because SSLSocket in many ways is not equivalent to raw sockets. Therefore python-socks does not officially support HTTPS proxy. asyncio has The reason python-socks doesn't not do it is because it is There is NO sync equivalent of Transport and trio doesn't have lower level Transport only high-level streams (it seems) Adding |
|
AI is able to generate a solution based on python-socks for HTTPS but it is an absolute unmaintainable trash full of dirty hacks. Instead picows will implement its own HTTPProxyConnector protocol. It is trivial and solves the problem. python-socks will only be used for socks4 and socks5 proxies. |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #80 +/- ##
==========================================
+ Coverage 91.78% 91.86% +0.07%
==========================================
Files 18 19 +1
Lines 2667 2777 +110
Branches 139 156 +17
==========================================
+ Hits 2448 2551 +103
- Misses 176 181 +5
- Partials 43 45 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.