Open johnpyp opened 3 weeks ago
Approach looks good.
Additionally, since I foresee that even with builtin proxy support there will still be people that need to further tweak the connection behavior. I implemented the ability for users to bring their own customized transport with 4f16b82
Supporting proxies for the websocket connection would be very helpful for multi-user bots.
node-steam-user
currently supports this, and its one of the remaining features I'm missing from steam-vent.I've prototyped this successfully by using
reqwest-websocket
instead of tungstenite-tokio directly, which allows easily upgrading a reqwest connection into a websocket one. Reqwest natively supports socks5/http/https proxies, so it makes the integration very easy. Here's the proof-of-concept replacement for the currenttransport/websocket.rs
, which generally seems to work:The other way to do this is with tokio-tungstenite connections manually, but it seems that it's significantly more work than this approach. Let me know if this current approach looks good and I can open a PR.