How can I create a socket that goes over local proxies?

I am trying to make a websocket connection to some server but I am getting an error response. So I would like to inspect my packets with burpsuit.

I am using tungstenite = "0.19"

tungstenite can work with anything that implements Read + Write but I have no idea how I would create something that implements them and goes through the local http and https proxy 127.0.0.1:8080.

Is there a crate that can create such a socket? Or would I have to do it myself? How would I do it?

Seems like this is all I needed:

let stream = std::net::TcpStream::connect("127.0.0.1:8080").unwrap();

And then turning on invisible proxy in burpsuit

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.