TakahikoKawasaki / nv-websocket-client

High-quality WebSocket client implementation in Java.
Apache License 2.0
2.02k stars 291 forks source link

SOCKS V5 Proxy instead of HTTP #16

Open akumaigorodski opened 8 years ago

akumaigorodski commented 8 years ago

It's just a question, not an issue. Is it possible to somehow use SOCKS V5 proxy instead oh HTTP one? I want to use Tor as proxy which provides SOCKS5 only proxy at 127.0.0.1:9050.

TakahikoKawasaki commented 8 years ago

I'm sorry it's not supported.

akumaigorodski commented 8 years ago

Okay, thanks. I can always install some web proxy like Polipo or Privoxy and bridge it to Tor. Just wanted to be sure there's no other way before I do.

eku commented 8 years ago

You could cascade proxies:

nv-websocket -> privoxy -> socksv5

Privoxy translates between HTTP and SOCKS.

nikiwaibel commented 8 years ago

native socks support (within ProxySettings) would be fantastic. can we change this closed issue into a feature request?

TakahikoKawasaki commented 8 years ago

@nikiwaibel Yes.

Vampire commented 5 years ago

To add on that, it would be nice if not only SOCKS5 proxies would be supported, but also SOCKS4. As the standard JDK is capable of both, it probably shouldn't be much of an issue to support both.

It would also be nice if you could support java.net.ProxySelector.getDefault(), so you would instantly support configuring a system-wide proxy and also the documented standard proxy properties. Also being able to set an explicit ProxySelector and setting an explicit Proxy would be nice instead of configuring hard-coded hostname and port which requires each consumer to implement a custom proxy-selection strategy himself. And while we talk about proxies, it would also nice if you could support some custom Authenticator interface similar to what OkHttp does with https://square.github.io/okhttp/3.x/okhttp/okhttp3/Authenticator.html, so that you can implement virtually any authentication scheme by evaluating the response and modifying the next request or if only supporting basic authentication then it would be nice if at least java.net.Authenticator.requestPasswordAuthentication would be supported. It is not helpful for anything besides a username / password authentication, but if only basic auth is supported anyway it would be nice to be supported. And also not being required to pre-emptively set the authentication details, would be nice, so that they are only sent when the proxy actually requires it, but just as option.

CensorKo commented 5 years ago

When will be support socks 5? thanks

jordanamr commented 4 years ago

Hello, any ETA on socks support? Thank you