# Terminal VPN

By [ryanzzy.eth](https://paragraph.com/@ryanzzy) · 2021-10-07

---

### git 翻墙

`~/.gitconfig`

    [http "http://github.com"]
        proxy = socks5://127.0.0.1:7899
    [https "https://github.com"]
        proxy = socks5://127.0.0.1:7899
    

### ssh 翻墙

`~/.ssh/config`

    Host github.com
        AddKeysToAgent yes
        UseKeychain yes
        IdentityFile ~/.ssh/id_rsa
        ProxyCommand nc -v -x 127.0.0.1:7899 %h %p
    

### 命令行翻墙

`~/.zshrc`

    # 需要重启命令行
    export http_proxy='socks5://127.0.0.1:7899'
    export https_proxy='socks5://127.0.0.1:7899'

---

*Originally published on [ryanzzy.eth](https://paragraph.com/@ryanzzy/terminal-vpn)*
