1. 程式人生 > >terminal/cmd/命令列設定代理

terminal/cmd/命令列設定代理

windowslinux的命令列設定不同,所以分開來講,但不管是使用什麼系統,都需要提前在本地以及代理伺服器上安裝並配置好shadowsocks客戶端和服務

linux系統可以使用graftcp來繞過ZF的網路封鎖,

對於windows使用者,可以進行如下操作:

使用cmd

# set
set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080

# test
curl -vv google.com

# unset
set http_proxy=
set https_proxy=

使用git bash

# set
export http_proxy=http://localhost:8080
export https_proxy=http://localhost:8080

# test
curl -vv google.com

# unset
export http_proxy=
export https_proxy=

以上

參考: windows終端命令列下如