Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active July 27, 2025 07:13
Show Gist options
  • Save githubutilities/09fd64b3117aa2c2b53c to your computer and use it in GitHub Desktop.
Save githubutilities/09fd64b3117aa2c2b53c to your computer and use it in GitHub Desktop.
Shadowsocks proxy and ssh proxy

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start

Client-side setup

  • Install Shadowsocks Client, e.g. run brew cask install shadowsocksx in Mac OSX.
  • SwitchSharp

Only config SOCKS Host to 127.0.0.1:1080 and select SOCKS v5

SSH Proxy

# `-N`: do not execute commands
# `-D`: bind 1080 port and forward 1080 port to 22 port
# `-i`: use pre-shared key `hello.pem`
# `-p`: specify port used to connect to remote server
ssh -ND 1080 -i ~/.ssh/hello.pem <username>@<your-remote-server-ip> -p 22

Tools

curl --socks5-hostname 127.0.0.1:1080 http://wtfismyip.com/json
@haxpor
Copy link

haxpor commented Mar 4, 2017

This is great! Thanks. For my case involves several dev tools, it's good idea to set system-wide proxy via environment variable of http_proxy and https_proxy even though a specific tool has a proxy configuration.

@lyrl
Copy link

lyrl commented Aug 26, 2022

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment