abdolence / slack-morphism-rust

A modern async client library for Rust, supports Slack Web / Events API/Socket Mode and Block Kit.
https://slack-rust.abdolence.dev
Apache License 2.0
162 stars 58 forks source link

Proxy support for Socket Mode (WS) #181

Open mehr74 opened 1 year ago

mehr74 commented 1 year ago

I am trying to use the proxy connector example to use socket api connection. The wss socket does not use the proxy and does not proceed. I believe the following line should be changed, and client_async_tls should be used instead when the client uses a proxy connector. https://github.com/abdolence/slack-morphism-rust/blob/d3923619b32c4dccb1d51534ce69ac6d8ed556bb/src/hyper_tokio/socket_mode/tungstenite_wss_client.rs#L106

abdolence commented 1 year ago

Hey.

Existing proxy support was intended only for Slack client, not for Socket Mode/Web Sockets.

Reading this https://github.com/snapview/tungstenite-rs/issues/177 I'm not sure if this works for HTTP/HTTPS proxies.

Would be great if anyone who needs proxies could test it and prepare PR, since I don't have that kind of needs myself.