使用 Tun 实现 ss 透明代理(目前只支持 Mac 系统)
brew install libsodium
git clone https://github.com/gfreezy/seeker.git
cd seeker
cargo build --release
编译完成后,程序在 target/release/seeker
。
-
启动
seeker
sudo seeker --config path/to/config.yml
-
修改本机 DNS 到
127.0.0.1
networksetup -setdnsservers Wi-Fi 127.0.0.1
server_config:
addr: domain-or-ip-to-ss-server:port
method: chacha20-ietf
password: password
dns_start_ip: 10.0.0.10
dns_server: 223.5.5.5:53
tun_name: utun4
tun_ip: 10.0.0.1
tun_cidr: 10.0.0.0/16
rules:
- 'DOMAIN,audio-ssl.itunes.apple.com,DIRECT'
- 'DOMAIN,gspe1-ssl.ls.apple.com,DIRECT'
- 'DOMAIN-KEYWORD,itunes.apple.com,PROXY'
- 'DOMAIN-KEYWORD,itunes.apple.com,PROXY'
- 'DOMAIN-SUFFIX,apple.co,REJECT'
- 'DOMAIN-SUFFIX,apple.com,REJECT'
- 'MATCH,DIRECT'
rm -rf dns.db
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http:https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http:https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.