Generating a new SSH key

1
2
3
4
5
6
7
ssh-keygen -t ed25519 -C "your_email@example.com"

ssh-copy-id USER@HOST
# or
mkdir ~/.ssh
chmod 755 ~/.ssh
cat /tmp/id_ed25519.pub >> ~/.ssh/authorized_keys

Proxy

1
2
3
4
5
6
python -m venv $HOME/local/python3
source $HOME/local/python3/bin/activate
pip install pproxy
pip install asyncssh
pproxy -l http://:8008 -r ssh://XXX.XXX.XXX.XXX#deploy::$HOME/.ssh/id_ed25519
pproxy -l socks5://:8008 -r ssh://XXX.XXX.XXX.XXX#deploy::$HOME/.ssh/id_ed25519
  • Git
1
2
3
4
git config --global http.proxy http://0:8008
git config --global https.proxy http://0:8008
# OR
ALL_PROXY=socks5://0:8008 git clone
  • Go
1
alias go='http_proxy=http://127.0.0.1:8008 https_proxy=http://127.0.0.1:8008 go'
  • Curl
1
2
3
export http_proxy=http://0:8008
export https_proxy=http://0:8008
export ftp_proxy=http://0:8008
  • Npm & Yarn
1
2
3
4
5
npm config set -g proxy=http://127.0.0.1:8008
npm config set -g https-proxy http://127.0.0.1:8008

yarn config set -g httpProxy http://0:8008
yarn config set -g httpsProxy http://0:8008
  • Gradle(~/.gradle/gradle.properties)
1
2
3
4
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=8008
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=8008