mhddos_proxy
mhddos_proxy copied to clipboard
Optimize bytes processing for proxy protocols
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).