linux:miwifi-shadowsocks
This is an old revision of the document!
Table of Contents
MiWifi with Shadowsocks
/etc/init.d/myshadowsocks
vim /etc/init.d/myshadowsocks
#!/bin/sh /etc/rc.common . /lib/functions.sh START=95 SS_REDIR_PID_FILE=/var/run/ss-redir.pid SS_TUNNEL_PID_FILE=/var/run/ss-tunnel.pid CONFIG=/etc/shadowsocks.json DNS=8.8.8.8:53 TUNNEL_PORT=5353 start() { # Client Mode #service_start /usr/bin/ss-local -c $CONFIG -b 0.0.0.0 -f $SERVICE_PID_FILE # Proxy Mode service_start /usr/bin/ss-redir -c $CONFIG -b 0.0.0.0 -f $SS_REDIR_PID_FILE # Tunnel service_start /usr/bin/ss-tunnel -c $CONFIG -b 0.0.0.0 -u -l $TUNNEL_PORT -L $DNS -f $SS_TUNNEL_PID_FILE } stop() { # Client Mode #service_stop /usr/bin/ss-local # Proxy Mode service_stop /usr/bin/ss-redir # Tunnel service_stop /usr/bin/ss-tunnel }
/etc/init.d/myshadowsocks enable //add to the auto start jobs /etc/init.d/myshadowsocks start //start
dnsmasq
https://github.com/cokebar/gfwlist2dnsmasq
gfwlist2dnsmasq.sh -s gfwlist -o /etc/dnsmasq.d/dnsmasq_list.conf
gfwlist iptables
ipset -N gfwlist iphash iptables -t nat -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 8964
Restart all the service
/etc/init.d/firewall restart /etc/init.d/myshadowsocks stop /etc/init.d/myshadowsocks start /etc/init.d/dnsmasq restart
Reference
/var/www/dokuwiki/wiki/data/attic/linux/miwifi-shadowsocks.1535952384.txt.gz · Last modified: 2018/09/03 13:26 by percy