切換到 engine 目錄,執(zhí)行g(shù)client sync
1.設(shè)置代理
在vi ~/.zshrc
文件中契讲,添加如下代碼:
function proxy_off(){
unset http_proxy
unset https_proxy
unset ftp_proxy
unset rsync_proxy
echo -e "已關(guān)閉代理"
}
#注意右冻,根據(jù)自己的配置設(shè)置
function proxy_on() {
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
export http_proxy="http://127.0.0.1:8001"
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy
export FTP_PROXY=$http_proxy
export RSYNC_PROXY=$http_proxy
echo -e "已開啟代理"
}
執(zhí)行source ~/.zshrc
,使其立刻生效腺逛。
2.設(shè)置一次proxy_on
需要使用代理時開啟ss全局模式荷愕,然后打開終端,輸入proxy_on就會啟動棍矛。如果需要關(guān)閉安疗,只需要輸入proxy_off。
proxy_on
3.判斷終端是否走了代理服務(wù)器
curl cip.cc
4.執(zhí)行g(shù)client sync
gclient sync