-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Proxy Support #111
Comments
Hi Redth, I'm somehow confused. The HTTP protocol is not used at all in the whois library since the WHOIS protocol itself is normally defined as a TCP/IP Socket connection to the port 43. I can't really understand how an HTTP Proxy would be useful in this case. |
I know this does sound a bit strange, but it is in fact possible to tunnel a TCP connection over a HTTP Proxy. I'm not terribly familiar with Ruby myself, so I can't give you any specific examples in ruby, but I am doing the same in C# already. Here's an excerpt from a wikipedia page that pretty much sums up the concept:
As the quote also states, almost always a proxy allowing use of CONNECT requires authentication, as is the case in my specific need scenario... |
Thanks for the documentation. I inspected the Ruby I must confess I don't have a deep experience with proxy connections and, also, I don't have any proxy configuration here to use to test the feature. |
I've PM'd you some proxies you can use to test with... |
Closing old feature request. Please feel free to provide a patch. |
ruby whois works fine with ruby-proxifier (https://github.com/samuelkadolph/ruby-proxifier). It might be worth putting a note about this in the documentation. |
@troelskn can you provide an example on how to use ruby-proxifier for ruby whois ? thanks in advance . |
@Redth were you somehow able to use proxies for whois ? |
Sine @ruben-verhagen and others have asked how to use proxifier, here's a small overview: proxifier works by patching the core ruby tcp libraries. So all you have to do is literally to
(Note the above won't work - you need to replace the http_proxy setting with whatever http proxy you use. I recommend proxymesh, but have no affiliation) I ended up needing to cycle through multiple proxies, so had to write a small patch to proxifier to allow this. Code below:
Usage:
You can add as many proxies as you like to the pool. |
@troelskn, I don't know why I always got 403 from myprivateproxy.net. Any idea? Is it because of those proxies? |
HTTP Proxy support would be fantastic!
The text was updated successfully, but these errors were encountered: