{"id":15107337,"url":"https://github.com/imgk/shadow","last_synced_at":"2025-09-27T05:31:38.736Z","repository":{"id":41155855,"uuid":"243968568","full_name":"imgk/shadow","owner":"imgk","description":"A rule-based transparent proxy for Windows, Linux, macOS","archived":true,"fork":false,"pushed_at":"2022-06-02T06:18:45.000Z","size":2167,"stargazers_count":203,"open_issues_count":3,"forks_count":45,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-16T06:17:26.720Z","etag":null,"topics":["gvisor","http","shadowsocks","socks5","transparent-proxy","trojan","tun2shadowsocks","tun2socks","windivert","wintun"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imgk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["imgk"]}},"created_at":"2020-02-29T12:53:43.000Z","updated_at":"2025-01-06T08:04:36.000Z","dependencies_parsed_at":"2022-07-14T08:31:24.176Z","dependency_job_id":null,"html_url":"https://github.com/imgk/shadow","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/imgk%2Fshadow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgk%2Fshadow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgk%2Fshadow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgk%2Fshadow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgk","download_url":"https://codeload.github.com/imgk/shadow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234391381,"owners_count":18824810,"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":["gvisor","http","shadowsocks","socks5","transparent-proxy","trojan","tun2shadowsocks","tun2socks","windivert","wintun"],"created_at":"2024-09-25T21:23:40.804Z","updated_at":"2025-09-27T05:31:38.382Z","avatar_url":"https://github.com/imgk.png","language":"Go","funding_links":["https://github.com/sponsors/imgk"],"categories":["Go"],"sub_categories":[],"readme":"# Shadow\n\nA transparent proxy client for Windows, Linux and macOS, which now supports shadowsocks, trojan, socks5, http and wireguard, as well as all methods supported by v2ray.\n\n## How to build\n\nBuild with Go 1.16.\n\nReplace `$(proto)` with names of proxies which you want to use. Currently shadow supports `socks`, `shadowsocks`, `trojan`, `http`, `wireguard` or `v2ray`.\n\n```\n# linux darwin windows,wintun\ngo get -v -ldflags=\"-s -w\" -trimpath -tags=\"$(proto)\" github.com/imgk/shadow\n\n# windows,windivert\ngo get -v -ldflags=\"-s -w\" -trimpath -tags=\"divert $(proto)\" github.com/imgk/shadow\n```\n\n## How to use it\n\n```\n-\u003e  ~ go/bin/shadow -h\nUsage of go/bin/shadow:\n  -c string\n        config file (default \"config.json\")\n  -t duration\n        timeout (default 3m0s)\n  -v    enable verbose mode\n```\n\n### Windows\n\nFor WinTun, download [WinTun](https://www.wintun.net) and put `wintun.dll` in `C:\\Windows\\System32`.\n\nFor WinDivert, download [WinDivert](https://www.reqrypt.org/windivert.html) 2.2 and put `WinDivert.dll` and `WinDivert64.sys` in `C:\\Windows\\System32`.\n\n#### GUI\n\nUse shadow with simple GUI [shadow-windows](https://github.com/imgk/shadow-windows).\n\n#### CLI\n\nRun shadow.exe with administrator privilege.\n\n```\ngo/bin/shadow.exe -c C:/Users/example/shadow/config.json -v\n```\n\n### Linux and OpenWrt Router\n\n1. Set system DNS server. Please add DNS server to `ip_cidr_rules.proxy` for diverting all DNS queries to shadow.\n\n```\nsudo go/bin/shadow -c /etc/shadow.json -v\n```\n\nIf you are using OpenWrt, you need to configure firewall.\n\n```\n# set tun name in the config.json\nexport TunName=utun\n\n# configure firewall for OpenWrt\niptables -I FORWARD -o $TunName -j ACCEPT\niptables -t nat -I POSTROUTING -o $TunName -j MASQUERADE\n```\n\n### macOS\n\n1. Set system DNS server. Please add DNS server to `ip_cidr_rules.proxy` for diverting all DNS queries to shadow.\n\n```\nsudo go/bin/shadow -c /etc/shadow.json -v\n```\n\n## Documentation\n\nPlease read [doc/README.md](https://github.com/imgk/shadow/blob/main/doc/README.md)\n\n## TODO\n- [ ] Set interface IPv6 address and IPv6 routes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgk%2Fshadow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgk%2Fshadow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgk%2Fshadow/lists"}