Conversation
|
While the original patch passed my integration tests (technoweenie/faraday-live#7), I didn't like how the username and password were set: TCPSocket.socks_username = proxy[:user] if proxy[:user]
TCPSocket.socks_password = proxy[:password] if proxy[:password]
Net::HTTP::SOCKSProxy(proxy[:uri].host, proxy[:uri].port)A global (or at-best, a thread local) socks username/pass doesn't seem very safe. I rewrote this to use the socksify maintainer's PR to support proxy authentication: astro/socksify-ruby#33 |
iMacTia
left a comment
There was a problem hiding this comment.
Nice implementation and great opportunity to also rewrite some old code in a much better way.
Ignoring Code Climate issues for the reasons explained in the comment above.
|
For future visitors, this change is technically good to go but is waiting for astro/socksify-ruby#33 to be merged. |
|
This takes forever 😅 |
|
Cross-dependencies with other libraries 🙈. |
|
This patches in SOCKS proxy support for the net/http adapter, using this snippet by @yarafan: #787 (comment).
I don't want to add the socksify gem as a required gem dependency for faraday. The net/http adapter attempts to load it, but only complains if you try to use a socks proxy:
This behavior is difficult to test with rspec, so I tested this in the integration test suite faraday-live.
Fixes #787