websocket-kit icon indicating copy to clipboard operation
websocket-kit copied to clipboard

How can I use this library to access it via socks5 proxy?

Open ljh740 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I would like to make wss requests through a socks5 proxy. For example: user:[email protected]:10086

    ///   - proxy: Host component of the URI for the proxy server.
    ///   - proxyPort: Port on which to connect to the proxy server.

I only see these two parameters, how do I set them up and use them?

Describe the solution you'd like use it

Describe alternatives you've considered null

ljh740 avatar Jul 17 '24 08:07 ljh740

Pass the host components (auth details and hostname) in the proxy part and the port for the port argument

0xTim avatar Jul 17 '24 11:07 0xTim

Pass the host components (auth details and hostname) in the proxy part and the port for the port argument

proxy: "user:[email protected]" proxyPort: 10086

some error

NIOPosix.NIOConnectionError(host: "user:[email protected]", port: 10086, dnsAError: Optional(NIOCore.SocketAddressError.unknown(host: "user:[email protected]", port: 10086)), dnsAAAAError: Optional(NIOCore.SocketAddressError.unknown(host: "user:[email protected]", port: 10086)), connectionErrors: [])

ljh740 avatar Jul 18 '24 02:07 ljh740

Ah ok, so looks like we'd need to do some work to convert this automatically however if you convert the auth details to an HTTP Basic Auth header and pass that to proxyHeaders that should work

0xTim avatar Jul 21 '24 17:07 0xTim

Do these proxy and proxyPort parameters really support a SOCKS proxy? After filling them out, I am seeing it make a CONNECT request (AKA HTTP Proxy) to the socks port, which is the wrong protocol and does not succeed.

baines avatar Oct 24 '25 15:10 baines