A cross-platform proxy client/server for Linux/Windows/macOS with Pcap/RawSocket/WinDivert
Usage
./phantomsocks -h
Usage of ./phantomsocks:
-log int
LogLevel
-maxprocs int
MaxProcesses
-install
Install service (Windows)
-remove
Remove service (Windows)
-start
Start service (Windows)
-stop
Stop service (Windows)
[default] #domains below will use the config of this interface
domain=ip,ip,... #this domain will use these IPs
domain #this domain will be resolved by DNS
domain=[domain] #this domain will use the config of this domain
domain=domain #this domain will use the addresses of this domain
[dot] #domains below will use the config of dot
domain
[socks5] #domains below will use the config of socks5
domain
cd ~/Downloads
wget https://downloads.openwrt.org/releases/19.07.2/targets/ramips/mt7621/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64.tar.xz
tar -xJvf openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64.tar.xz
wget https://www.tcpdump.org/release/libpcap-1.9.1.tar.gz
tar -xzvf libpcap-1.9.1.tar.gz
Build libpcap
cd libpcap-1.9.1
./configure --host=mipsel-openwrt-linux-musl --prefix='~/Downloads/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.5.0_musl'
make && make install
Build phantomsocks
cd ~/go/src/github.com/Macronut/phantomsocks
env GOOS=linux GOARCH=mipsle CGO_ENABLED=1 CC='~/Downloads/openwrt-sdk-19.07.2-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.5.0_musl/bin/mipsel-openwrt-linux-gcc' go build -ldflags '-extldflags "-static"'
请发表评论