Skip to content

Instantly share code, notes, and snippets.

@daemonp
Last active November 11, 2018 18:49
Show Gist options
  • Save daemonp/8f94164d978f83c73d1a87b90670e8d8 to your computer and use it in GitHub Desktop.
Save daemonp/8f94164d978f83c73d1a87b90670e8d8 to your computer and use it in GitHub Desktop.

OpenWRT/LEDE using redsocks to route pandora traffic through redsocks to shadowsocks proxy in the US

/etc/rc.local

iptables -t nat -N REDSOCKS
iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-ports 12345
iptables -t nat -A PREROUTING -p tcp -d 208.85.40.0/24 -j REDSOCKS

/etc/config/shadowsocks-libev

config ss_local
        option server 'sss0'
        option local_address '0.0.0.0'
        option local_port '1080'
        option timeout '30'

config server 'sss0'
        option server 'shadowsocks.server.com'
        option server_port '1080'
        option password '************'
        option method 'salsa20'

/etc/redsocks.conf

base {
        log_debug = off;
        log_info = on;
        log = "syslog:local7";
        daemon = on;
        redirector = iptables;
}

redsocks {
        local_ip = 0.0.0.0;
        local_port = 12345;

        ip = 127.0.0.1;
        port = 1080;
        type = socks5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment