F
F
ff0xff2019-05-08 13:25:34
Node.js
ff0xff, 2019-05-08 13:25:34

How to open ws connection through proxy?

I open a ws connection something like this:

const ws = new WebSocket('wss://api.example.com/api/2/ws', {
        perMessageDeflate: false
    });

but what should I do if I want to establish a connection through a proxy server with authorization?
How to write - is it even possible for ws (although why not bro does it work)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2019-05-08
@bingo347

https://github.com/websockets/ws#how-to-connect-vi...
https://github.com/TooTallNate/node-https-proxy-ag...
https://github.com/ TooTallNate/node-socks-proxy-ag...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question