Skip to content

Loading…

Proxy Support #111

Closed
Redth opened this Issue · 8 comments

4 participants

@Redth

HTTP Proxy support would be fantastic!

@weppos
Owner

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.

@Redth

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:
http://en.wikipedia.org/wiki/Tunneling_protocol

Another HTTP-based tunneling method uses the HTTP CONNECT method/command. A client issues the HTTP CONNECT command to a HTTP proxy. The proxy then makes a TCP connection to a particular server:port, and relays data between that server:port and the client connection. Because this creates a security hole, CONNECT-capable HTTP proxies commonly restrict access to the CONNECT method. The proxy allows access only to a whitelist of specific authorized servers.

As the quote also states, almost always a proxy allowing use of CONNECT requires authentication, as is the case in my specific need scenario...

@weppos
Owner

Thanks for the documentation. I inspected the Ruby Net::HTTP proxy source code and I was able to find the use of the CONNECT statement.

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.

@Redth

I've PM'd you some proxies you can use to test with...

@weppos
Owner

Closing old feature request. Please feel free to provide a patch.

@weppos weppos closed this
@troelskn

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.

@ruben-verhagen

@troelskn can you provide an example on how to use ruby-proxifier for ruby whois ? thanks in advance .

@ruben-verhagen

@Redth were you somehow able to use proxies for whois ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.