{"id":25411723,"url":"https://github.com/koho/tun2","last_synced_at":"2025-04-14T08:29:25.411Z","repository":{"id":107983221,"uuid":"554067861","full_name":"koho/tun2","owner":"koho","description":"A combination of tun2socks and other proxy clients.","archived":false,"fork":false,"pushed_at":"2022-10-23T14:55:25.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T10:21:02.387Z","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":"mit","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":"LICENSE","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-10-19T07:42:53.000Z","updated_at":"2023-01-13T19:59:06.000Z","dependencies_parsed_at":"2023-06-03T10:46:02.309Z","dependency_job_id":null,"html_url":"https://github.com/koho/tun2","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%2Ftun2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Ftun2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Ftun2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koho%2Ftun2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koho","download_url":"https://codeload.github.com/koho/tun2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248845394,"owners_count":21170758,"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.347Z","updated_at":"2025-04-14T08:29:25.399Z","avatar_url":"https://github.com/koho.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tun2\n\nA combination of [badvpn-tun2socks](https://github.com/ambrop72/badvpn) and other proxy clients.\n\nAvailable Docker images:\n\n| Image                            | Note                                                                       |\n|----------------------------------|----------------------------------------------------------------------------|\n| [tun2/socks](/socks)             | Just `badvpn-tun2socks`.                                                   |\n| [tun2/shadowsocks](/shadowsocks) | Use [shadowsocks-libev](https://github.com/shadowsocks/shadowsocks-libev). |\n| [tun2/trojan](/trojan)           | Use [trojan-go](https://github.com/p4gefau1t/trojan-go).                   |\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 proxy client.\n4. The proxy client forwards traffic to remote proxy server.\n\n## Usage\n\n```shell\ndocker pull tun2/shadowsocks\n```\n\nYou must run this container in `--privileged` mode.\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 tun2/shadowsocks\n```\n\n### Use local config file\n\n```shell\ndocker run --privileged -v /etc/ss/config.json:/subs.json -e SUBNET=192.168.0.0/16 tun2/shadowsocks\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%2Ftun2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoho%2Ftun2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoho%2Ftun2/lists"}