A lightweight tunnel proxy, provides a SOCKS5 proxy and a transparent proxy.
Build
- install libev (optional)
# Archlinux sudo pacman -S libev # CentOS sudo yum install libev-devel # Debian/Ubuntu sudo apt-get install libev-dev
- configure and make
autoreconf -if ./configure --prefix=/usr --sysconfdir=/etc make
- install
sudo make install
Cross compile
- setup cross compile tool chain
- build
autoreconf -if ./configure --host=arm-unknown-linux-gnueabihf \ --prefix=/usr --sysconfdir=/etc
Usage
man iosocks
Advanced usage
ioredir prorides a transpant TCP proxy. This feature requires Linux netfilter's NAT function.
iptables -t nat -N iosocks
iptables -t nat -A iosocks -d ${server} -j RETURN
iptables -t nat -A iosocks -d 0.0.0.0/8 -j RETURN
iptables -t nat -A iosocks -d 10.0.0.0/8 -j RETURN
iptables -t nat -A iosocks -d 127.0.0.0/8 -j RETURN
iptables -t nat -A iosocks -d 169.254.0.0/16 -j RETURN
iptables -t nat -A iosocks -d 172.16.0.0/12 -j RETURN
iptables -t nat -A iosocks -d 192.168.0.0/16 -j RETURN
iptables -t nat -A iosocks -d 224.0.0.0/4 -j RETURN
iptables -t nat -A iosocks -d 240.0.0.0/4 -j RETURN
iptables -t nat -A iosocks -p tcp -j REDIRECT --to-ports 1081
iptables -t nat -A OUTPUT -p tcp -j iosocks
iptables -t nat -A PREROUTING -p tcp -j iosocks
from https://github.com/puxxustc/iosocks
No comments:
Post a Comment