Websocket currently does not have built-in support for proxy configurations. Consequently, it's necessary to provide necessary options directly to the WebSocket constructor when establishing a connection.
Example:
import { SocksProxyAgent } from 'socks-proxy-agent';
...
this.wsClient = new WebsocketStream({
callbacks,
combinedStreams: true,
agent: process.env.BINANCE_PROXY ? new SocksProxyAgent(
process.env.BINANCE_PROXY
) : undefined
});
Websocket currently does not have built-in support for proxy configurations. Consequently, it's necessary to provide necessary options directly to the WebSocket constructor when establishing a connection.
Example: