{"id":25411730,"url":"https://github.com/koho/ss-tun","last_synced_at":"2025-04-14T08:29:26.076Z","repository":{"id":107983179,"uuid":"528319053","full_name":"koho/ss-tun","owner":"koho","description":"A Docker image of Shadowsocks tunnel (tun2socks + shadowsocks-libev).","archived":false,"fork":false,"pushed_at":"2022-10-09T17:38:22.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T10:21:03.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koho.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":"2022-08-24T07:47:22.000Z","updated_at":"2022-08-24T07:51:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"170869d7-c615-413b-8a24-8ff1701d86b7","html_url":"https://github.com/koho/ss-tun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Fss-tun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Fss-tun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Fss-tun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Fss-tun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koho","download_url":"https://codeload.github.com/koho/ss-tun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248845396,"owners_count":21170760,"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":[],"created_at":"2025-02-16T10:19:22.679Z","updated_at":"2025-04-14T08:29:26.066Z","avatar_url":"https://github.com/koho.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shadowsocks Tunnel\n\nThis Docker image is a combination of [badvpn-tun2socks](https://github.com/ambrop72/badvpn)\nand [shadowsocks-libev](https://github.com/shadowsocks/shadowsocks-libev).\n\nSince [shadowsocks-rust](https://github.com/shadowsocks/shadowsocks-rust) has a native support for tun mode, we don't\nneed tun2socks anymore.\n\n## How it works\n\n1. Create a [TUN](https://en.wikipedia.org/wiki/TUN/TAP) device like a VPN software.\n2. Modify the routing table and route all traffic to the TUN device.\n3. The software `tun2socks` will forward traffic (TCP and UDP) from TUN device to the SOCKS server of `ss-local`.\n4. `ss-local` forwards traffic to remote server.\n\n## Usage\n\n```shell\ndocker pull sstun/ss-tun\n```\n\nYou must run this container in `--privileged` mode. See [Run](#Run).\n\n### Environment variable\n\n| Env      | Description                                           | Required |\n|----------|-------------------------------------------------------|----------|\n| URL      | Shadowsocks subscription link.                        | No       |\n| SUBNET   | Subnet (CIDR) traffic that goes into tunnel.          | Yes      |\n| NAME     | Use the specific named proxy in subscription.         | No       |\n| UPDATE   | If \"true\", update config file from subscription link. | No       |\n\nIf you don't use subscription link, mount the local config file to the container\nusing `-v /etc/ss/config.json:/ss-sub.json`.\n\n### Subscription format\n\nThe subscription link should download a JSON file that contains an array of proxy object.\n\n```json\n[\n  {\n    \"name\": \"server1\",\n    \"remarks\": \"My Server\",\n    \"server\": \"example.com\",\n    \"server_port\": 2345,\n    \"method\": \"aes-256-gcm\",\n    \"password\": \"test\",\n    \"use_syslog\": false,\n    \"ipv6_first\": false,\n    \"fast_open\": false,\n    \"reuse_port\": false,\n    \"no_delay\": false,\n    \"mode\": \"tcp_and_udp\"\n  }\n]\n```\n\n### Run\n\nFor examples, your local subnet is `192.168.0.0/16`.\n\n#### Use subscription link\n\n```shell\ndocker run --privileged -e URL=https://example.com/ -e SUBNET=192.168.0.0/16 sstun/ss-tun\n```\n\n#### Use local config file\n\n```shell\ndocker run --privileged -v /etc/ss/config.json:/ss-sub.json -e SUBNET=192.168.0.0/16 sstun/ss-tun\n```\n\n### Change gateway\n\nChange the default gateway of your host to the container IP. The traffic of your host should go through the Shadowsocks\ntunnel in the container now.\n\n## Use cases\n\n- OpenWrt\n- RouterOS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoho%2Fss-tun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoho%2Fss-tun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoho%2Fss-tun/lists"}