Tutorials Add TCP Congestion Control algorithm (Shadowsocks)

Marks-Man

Administrator
Edit "tcprelay.py"

Find:

Python:

Code:
self._remote_address = None
        fd_to_handlers[local_sock.fileno()] = self
        local_sock.setblocking(False)

add after it :

Python:

Code:
if sys.platform.startswith('linux') and 'cc_algo' in config:
            TCP_CONGESTION = getattr(socket, 'TCP_CONGESTION', 13)
            local_sock.setsockopt(socket.IPPROTO_TCP, TCP_CONGESTION, config['cc_algo'])

Then Compile, and add to your .json config "cc_algo" parameter, and use your preferred congestion controller ;)

:)

Continue reading...
 
Top