Skip to content

Instantly share code, notes, and snippets.

@myl7
Created November 20, 2021 02:54
Show Gist options
  • Save myl7/18193e1405894060d38fedf413b80f96 to your computer and use it in GitHub Desktop.
Save myl7/18193e1405894060d38fedf413b80f96 to your computer and use it in GitHub Desktop.
git with proxy for github.com
[http "https://github.com"]
proxy = http://127.0.0.1:10800
[https "https://github.com"]
proxy = http://127.0.0.1:10800
#!/usr/bin/env bash
set -euo pipefail
# Use the script to call git clone like:
# git.sh clone [email protected]:AppFlowy-IO/appflowy.git
if [[ "$1" == clone ]] && [[ "$2" =~ ^git@github\.com ]]; then
# git ssh:// can literally work with proxychains
proxychains -q git "$@"
else
git "$@"
fi
@myl7
Copy link
Author

myl7 commented Apr 13, 2022

Since currently proxychains-ng breaks to proxy SSH, now the git.sh file is useless

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