• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

imgk/shadow: A rule-based transparent proxy for Windows, Linux, macOS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

imgk/shadow

开源软件地址(OpenSource Url):

https://github.com/imgk/shadow

开源编程语言(OpenSource Language):

Go 99.7%

开源软件介绍(OpenSource Introduction):

Shadow

A 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.

How to build

Build with Go 1.16.

Replace $(proto) with names of proxies which you want to use. Currently shadow supports socks, shadowsocks, trojan, http, wireguard or v2ray.

# linux darwin windows,wintun
go get -v -ldflags="-s -w" -trimpath -tags="$(proto)" github.com/imgk/shadow

# windows,windivert
go get -v -ldflags="-s -w" -trimpath -tags="divert $(proto)" github.com/imgk/shadow

How to use it

->  ~ go/bin/shadow -h
Usage of go/bin/shadow:
  -c string
        config file (default "config.json")
  -t duration
        timeout (default 3m0s)
  -v    enable verbose mode

Windows

For WinTun, download WinTun and put wintun.dll in C:\Windows\System32.

For WinDivert, download WinDivert 2.2 and put WinDivert.dll and WinDivert64.sys in C:\Windows\System32.

GUI

Use shadow with simple GUI shadow-windows.

CLI

Run shadow.exe with administrator privilege.

go/bin/shadow.exe -c C:/Users/example/shadow/config.json -v

Linux and OpenWrt Router

  1. Set system DNS server. Please add DNS server to ip_cidr_rules.proxy for diverting all DNS queries to shadow.
sudo go/bin/shadow -c /etc/shadow.json -v

If you are using OpenWrt, you need to configure firewall.

# set tun name in the config.json
export TunName=utun

# configure firewall for OpenWrt
iptables -I FORWARD -o $TunName -j ACCEPT
iptables -t nat -I POSTROUTING -o $TunName -j MASQUERADE

macOS

  1. Set system DNS server. Please add DNS server to ip_cidr_rules.proxy for diverting all DNS queries to shadow.
sudo go/bin/shadow -c /etc/shadow.json -v

Documentation

Please read doc/README.md

TODO

  • Set interface IPv6 address and IPv6 routes



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
sbarex/QLMarkdown: macOS Quick Look extension for Markdown files.发布时间:2022-08-18
下一篇:
mroth/bootslap: bootstraps macOS to be usable发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap