{"id":14008150,"url":"https://github.com/ihciah/rabbit-tcp","last_synced_at":"2025-04-05T09:08:31.824Z","repository":{"id":49364527,"uuid":"210384951","full_name":"ihciah/rabbit-tcp","owner":"ihciah","description":"A multi-connection TCP forwarder/accelerator","archived":false,"fork":false,"pushed_at":"2023-02-25T01:41:37.000Z","size":238,"stargazers_count":497,"open_issues_count":11,"forks_count":78,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-29T08:08:56.078Z","etag":null,"topics":["multi-connection-tcp","shadowsocks"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ihciah.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-23T15:06:14.000Z","updated_at":"2025-03-16T02:53:35.000Z","dependencies_parsed_at":"2024-06-18T20:05:04.504Z","dependency_job_id":"0963671e-3f3d-47ac-a3a1-36d6fd0faf32","html_url":"https://github.com/ihciah/rabbit-tcp","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihciah%2Frabbit-tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihciah%2Frabbit-tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihciah%2Frabbit-tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihciah%2Frabbit-tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ihciah","download_url":"https://codeload.github.com/ihciah/rabbit-tcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312081,"owners_count":20918344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["multi-connection-tcp","shadowsocks"],"created_at":"2024-08-10T11:01:17.940Z","updated_at":"2025-04-05T09:08:31.516Z","avatar_url":"https://github.com/ihciah.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Rabbit TCP\n\n![Build badge](https://github.com/ihciah/rabbit-tcp/workflows/Build/badge.svg) ![Docker pull badge](https://img.shields.io/docker/pulls/ihciah/rabbit)\n\nA multi-connection TCP forwarder created for accelerating TCP connections\n\nEnglish | [中文](README_ZH.MD)\n\n## Introduction\n\nThis project is created to support and forward TCP connections. It will split bytes into blocks and reconstruct them during forwarding.\nAll 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.\n\nDue 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).\nThis project the extension of the accelerating method of [ShadowSocks-magic](https://github.com/ihciah/go-shadowsocks-magic).\n\n![Rabbit TCP](.github/resources/rabbit-tcp.svg)\n\n## Get Started\nThis project can work in standalone proxy mode or inline in other Golang code.\n\nHere are two common usage examples. For detailed documentation, please go to the [Wiki](https://github.com/ihciah/rabbit-tcp/wiki).\n\n### Accelerate any TCP service in a standalone proxy mode\n#### Server side\n1. Install [Docker](https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-convenience-script) and [docker-compose](https://docs.docker.com/compose/install/)\n2. Download and edit `docker-compose-server.yml` ([Link](https://github.com/ihciah/rabbit-tcp/raw/master/docker-compose-server.yml))\n    ```yaml\n    rabbit-server:\n      image: ihciah/rabbit\n      ports:\n        - \"$RABBIT_PORT:9891/tcp\"\n      environment:\n        - MODE=s\n        - PASSWORD=$RABBIT_PASSWORD\n        - RABBITADDR=:9891\n        - VERBOSE=2\n      restart: always\n    ```\n   - `$RABBIT_PORT` replaced with RabbitTCP service port, which should be the same as the client side\n   - `$RABBIT_PASSWORD`  replaced with RabbitTCP service password, which should be the same as the client side\n3. Run in the same directory `docker-compose -f docker-compose-server.yml up -d`\n\n#### Client side\n1. Install [Docker](https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-convenience-script) and [docker-compose](https://docs.docker.com/compose/install/)\n2. Download and edit `docker-compose-client.yml` ([Link](https://github.com/ihciah/rabbit-tcp/raw/master/docker-compose-client.yml))\n    ```yaml\n    rabbit-client:\n      image: ihciah/rabbit\n      ports:\n        - \"$CLIENT_LISTEN_PORT:9892/tcp\"\n      environment:\n        - MODE=c\n        - PASSWORD=$RABBIT_PASSWORD\n        - RABBITADDR=$RABBIT_ADDR\n        - LISTEN=:9892\n        - DEST=$SERVICE_ADDR\n        - TUNNELN=6\n        - VERBOSE=2\n      restart: always\n    ```\n   - `$RABBIT_ADDR` replaced with `ip_or_domain:port` , which should be the same as the server side\n   - `$RABBIT_PASSWORD` replaced with RabbitTCP service password, which should be the same as the server side\n   - `$SERVICE_ADDR` replaced with the `ip_or_domain:port` of the target service\n   - `$CLIENT_LISTEN_PORT` replaced with local listen port, which can be dialed when connecting to the target service with acceleration.\n   - Modify `TUNNELN` if you want to change count of physical connections\n3. Run in the same directory `docker-compose -f docker-compose-server.yml up -d`\n\n### Accelerate ShadowSocks service in a standalone proxy mode with plugin\nThe server-side configuration is the same as above. Please note that except for Rabbit TCP server, you have to [run ShadowSocks service](https://github.com/shadowsocks/shadowsocks-libev/blob/master/docker/alpine/docker-compose.yml) too.\n\nConfigure client-side as above is useful too if you want to run a forwarder on a server inside the blocked area.\n\nHowever, run docker or daemon service on client devices is not so user-friendly. What recommended is the plugin built for ShadowSocks: [Rabbit Plugin](https://github.com/ihciah/rabbit-plugin).\n\n1. [Download the latest Rabbit Plugin release](https://github.com/ihciah/rabbit-plugin/releases), unzip it and put it into the ShadowSocks folder(same as ShadowSocks.exe).\n2. Fill in ShadowSocks client configuration(Take [ShadowSocks Windows](https://github.com/shadowsocks/shadowsocks-windows) as an example)\n    - Server Addr: Rabbit TCP service ip/domain\n    - Server Port: Rabbit TCP service port\n    - Password: ShadowSocks password\n    - Encryption: ShadowSocks Encryption\n    - Plugin Program: The binary filename(without `.exe`)\n    - Plugin Options: `serviceAddr=SHADOWSOCKS_ADDR;password=RABBIT_PASSWORD;tunnelN=4`\n        - `SHADOWSOCKS_ADDR` is ShadowSocks server address(ip:port or domain:port), for example: `10.10.10.10:443`\n        - `RABBIT_PASSWORD` is Rabbit TCP password\n        - Modify `tunnelN` to change count of physical connections\n3. Save\n\n## Speedup Result\n\nEnvironment:\n\n- `Chrome \u003c--\u003e ShadowsocksWindows \u003c--\u003e RabbitTCP \u003c==[ISP]==\u003e RabbitTCP \u003c--\u003e ShadowsocksLibev`\n- Local ISP: China Unicom - Shanghai\n- Remote ISP: Amazon LightSail - Tokyo\n- Physical Connections Count: 4\n\n\nSpeedup with Rabbit TCP([Link](https://www.speedtest.net/result/8667412671)):\n\n![Speed with rabbit-tcp](.github/resources/SpeedWithRabbit.jpg)\n\nOriginal ShadowSocks libev([Link](https://www.speedtest.net/result/8667415664)):\n\n![Speed without rabbit-tcp](.github/resources/SpeedWithoutRabbit.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihciah%2Frabbit-tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fihciah%2Frabbit-tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihciah%2Frabbit-tcp/lists"}