Septs 5ea25e6736 Add `shell-proxy` plugin (#8692) | 4 年之前 | |
---|---|---|
.. | ||
README.md | 4 年之前 | |
proxy.py | 4 年之前 | |
shell-proxy.plugin.zsh | 4 年之前 | |
ssh-agent.py | 4 年之前 | |
ssh-proxy.py | 4 年之前 |
This a pure user-space program, shell-proxy setter, written Python3 and Bash.
100% only no side-effects, only effect environment variables and aliases
$GIT_SSH
alias
Method 1:
$DEFAULT_PROXY
is the proxy URL you will set
Method 2:
Write a program to $HOME/.config/proxy
in the file.
Example program:
#!/bin/bash
# The file path: $HOME/.config/proxy
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "http://127.0.0.1:6152" # Surge Mac
else
echo "http://127.0.0.1:8123" # polipo
fi
Method 3:
The working path of Method 2 can be changed via $CONFIG_PROXY
$GIT_SSH
: https://www.git-scm.com/docs/git#Documentation/git.txt-codeGITSSHcodePublic Domain