dizda / fast-socks5

Fast SOCKS5 client/server implementation written in Rust async/.await (with tokio)
https://anyip.io/
MIT License
340 stars 67 forks source link

feature request: ability for read/write size for regular socks5 usage #22

Closed GlenDC closed 2 years ago

GlenDC commented 2 years ago

In the case of your server example (so a direct usage of your socket (client<->socket<->target) it currently doesn't seem to be possible to get the bytes read/written? Would this be possible, I imagine so?

GlenDC commented 2 years ago

I also wonder in general if we cannot keep track of the total bytes read/written in the the sockets. Such that we can provide a method to give the total bytes read/written, even in case of errors returned, it might still be useful (I would def like to know) how much bytes already were transferred.

GlenDC commented 2 years ago

This one is probably not required for me. As I'm doing all the actual data transfer using tokio's bidirectional copy, that function is really sufficient for me. If others do want it for regular usage, this issue can be re-opened none the less.