A multi-connection TCP forwarder created for accelerating TCP connections
English | 中文
This project is created to support and forward TCP connections. It will split bytes into blocks and reconstruct them during forwarding.
All upper connections visible to all users are carried by N underlying physical connections, and even a single upper connection is forwarded through all underlying connections.
Due to the use of multiple connections, similar to the multi-threaded downloader, this project can accelerate the connection without any more traffic consumption (bilateral deployment is required). This project the extension of the accelerating method of ShadowSocks-magic.
This project can work in standalone proxy mode or inline in other Golang code.
Here are two common usage examples. For detailed documentation, please go to the Wiki.
- Install Docker and docker-compose
- Download and edit
docker-compose-server.yml(Link)rabbit-server: image: ihciah/rabbit ports: - "$RABBIT_PORT:9891/tcp" environment: - MODE=s - PASSWORD=$RABBIT_PASSWORD - RABBITADDR=:9891 - VERBOSE=2 restart: always
$RABBIT_PORTreplaced with RabbitTCP service port, which should be the same as the client side$RABBIT_PASSWORDreplaced with RabbitTCP service password, which should be the same as the client side
- Run in the same directory
docker-compose -f docker-compose-server.yml up -d
- Install Docker and docker-compose
- Download and edit
docker-compose-client.yml(Link)rabbit-client: image: ihciah/rabbit ports: - "$CLIENT_LISTEN_PORT:9892/tcp" environment: - MODE=c - PASSWORD=$RABBIT_PASSWORD - RABBITADDR=$RABBIT_ADDR - LISTEN=:9892 - DEST=$SERVICE_ADDR - TUNNELN=6 - VERBOSE=2 restart: always
$RABBIT_ADDRreplaced withip_or_domain:port, which should be the same as the server side$RABBIT_PASSWORDreplaced with RabbitTCP service password, which should be the same as the server side$SERVICE_ADDRreplaced with theip_or_domain:portof the target service$CLIENT_LISTEN_PORTreplaced with local listen port, which can be dialed when connecting to the target service with acceleration.- Modify
TUNNELNif you want to change count of physical connections
- Run in the same directory
docker-compose -f docker-compose-server.yml up -d
The server-side configuration is the same as above. Please note that except for Rabbit TCP server, you have to run ShadowSocks service too.
Configure client-side as above is useful too if you want to run a forwarder on a server inside the blocked area.
However, run docker or daemon service on client devices is not so user-friendly. What recommended is the plugin built for ShadowSocks: Rabbit Plugin.
- Download the latest Rabbit Plugin release, unzip it and put it into the ShadowSocks folder(same as ShadowSocks.exe).
- Fill in ShadowSocks client configuration(Take ShadowSocks Windows as an example)
- Server Addr: Rabbit TCP service ip/domain
- Server Port: Rabbit TCP service port
- Password: ShadowSocks password
- Encryption: ShadowSocks Encryption
- Plugin Program: The binary filename(without
.exe) - Plugin Options:
serviceAddr=SHADOWSOCKS_ADDR;password=RABBIT_PASSWORD;tunnelN=4SHADOWSOCKS_ADDRis ShadowSocks server address(ip:port or domain:port), for example:10.10.10.10:443RABBIT_PASSWORDis Rabbit TCP password- Modify
tunnelNto change count of physical connections
- Save
Environment:
Chrome <--> ShadowsocksWindows <--> RabbitTCP <==[ISP]==> RabbitTCP <--> ShadowsocksLibev- Local ISP: China Unicom - Shanghai
- Remote ISP: Amazon LightSail - Tokyo
- Physical Connections Count: 4
Speedup with Rabbit TCP(Link):
Original ShadowSocks libev(Link):

