mhddos_proxy icon indicating copy to clipboard operation
mhddos_proxy copied to clipboard

Optimize bytes processing for proxy protocols

Open 0xffiber opened this issue 2 years ago • 0 comments

Async version only.

As of now all proxy requests (for example, socks5 commands) are generated by creating Python objects (from python_socks library) and then generating bytes from them. Both operations are costly. Ideally, we want to leverage the fact that all operations are performed on a single thread by pre-allocating a single buffer, updating bytes in place, and copying from memview.

See src/proto_proxy.py for more details (the source code).

0xffiber avatar May 10 '22 14:05 0xffiber