Add TCP Congestion Control algorithm (Shadowsocks)

XMAN

Active member
Joined
Jul 12, 2021
Messages
19,642
Reaction score
71
Points
38
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