-
-
Save spajic/112b4f6903333b392f95cdbb6ce35fc3 to your computer and use it in GitHub Desktop.
shadowsocks / ssh proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ----- shadowsocks ------ | |
| server | |
| easy_install pip | |
| pip install shadowsocks | |
| vi /etc/shadowsocks.json | |
| { | |
| "server":"server_ip", | |
| "server_port":8388, | |
| "local_address": "127.0.0.1", | |
| "local_port":1080, | |
| "password":"password", | |
| "timeout":300, | |
| "method":"aes-256-cfb", | |
| "fast_open": false | |
| } | |
| ssserver -c /etc/shadowsocks.json -d start | |
| ssserver -c /etc/shadowsocks.json -d stop | |
| client Mac | |
| brew install shadowsocks-libev | |
| vi /usr/local/etc/shadowsocks-libev.json | |
| { | |
| "server":"server_id", | |
| "server_port":8388, | |
| "local_port":1080, | |
| "password":"password", | |
| "timeout":600, | |
| "method":"aes-256-cfb" | |
| } | |
| /usr/local/opt/shadowsocks-libev/bin/ss-local -c /usr/local/etc/shadowsocks-libev.json | |
| tunnel for forward port | |
| install https://github.com/shadowsocks/shadowsocks-libev | |
| vim /etc/shadowsocks-libev/config.json | |
| { | |
| "server":"remote_ssserver_id", | |
| "server_port":remote_ssserver_port, | |
| "local_address":"local_server_id", | |
| "local_port":local_server_any_port, | |
| "password":"password", | |
| "timeout":300, | |
| "method":"aes-256-cfb" | |
| } | |
| ss-tunnel -c /etc/shadowsocks-libev/config.json -L remote_server_id:remote_server_any_port | |
| SwitchyOmega | |
| set proxy to localhost:1080 | |
| ------- SSH proxy -------- | |
| ssh -qTnN -D <local-port> <remote-server> | |
| -q :- be very quite, we are acting only as a tunnel. | |
| -T :- Do not allocate a pseudo tty, we are only acting a tunnel. | |
| -f :- move the ssh process to background, as we don’t want to interact with this ssh session directly. | |
| -N :- Do not execute remote command. | |
| -n :- redirect standard input to /dev/null. | |
| SSH forward port | |
| ssh -L local_binding_ip:local_any_port:remote_server_id:remote_server_any_port root@remote_server_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment