Open trinity-1686a opened 3 years ago
I would also like to have something like this precisely for handling .onion
requests with Arti. It seems right now you could handle this by spawning the Atri` socks proxy as a subprocess and pointing reqwest at this but it is much more brittle and messy than it would be if it could be done in-process.
this might be heavily related/partly redundant with #39 depending on how this issue get fixed, feel free to close this issue if you consider it close enough to be considered a duplicate.
I'd like to have a way to use an arbitrary proxy protocol. It could be implemented by allowing the user to provide a
Fn(&str, u16) -> Read + Write
function or something similar (probably with more async I guess). This would allow to setup a connection through any kind of proxy, provided the user write the code to actually contact that proxy. My use case would be to use Reqwest with Arti, a Rust implementation of Tor, but a generic approach like this would help with supporting any kind of transport layer (arbitrary proxy, unix socket), either out of reqwest, or in it.