GFW-knocker / gfw_resist_tls_proxy

knock up GFW sni detection in tls client hello
GNU General Public License v3.0
1.67k stars 231 forks source link

Suggestion for better performance #78

Open Gharib110 opened 1 year ago

Gharib110 commented 1 year ago

The code currently uses the random module from the Python standard library to generate random numbers. However, this module can be slow for generating large numbers of random values. Consider using a faster random number generator like the numpy.random module or the random module from the secrets library.

The code currently uses the pycryptodome library to encrypt and decrypt data. However, this library can be slow for large amounts of data. Consider using a faster encryption algorithm like AES-NI or ChaCha20.

The code currently uses threads to handle multiple connections concurrently. However, Python's Global Interpreter Lock (GIL) can limit the performance of threaded code. Consider using the asyncio module to handle concurrency more efficiently.

The code currently uses TCP to transfer data between the client and the server. However, TCP can be slow and inefficient for certain types of data transfers. Consider using a more efficient data transfer protocol like QUIC.

The code currently uses blocking I/O to read and write data to the network. However, non-blocking I/O can be more efficient for handling large numbers of connections. Consider using asynchronous network I/O with the asyncio module to improve performance.

T-256 commented 1 year ago

As it says in description, it's just PoW script. The performant method of this method should implement in low level langs. But it's good idea to have python module for this method.

I created a repo for this purpose and perhaps finished this week if I had time.