背景
安裝openclaw 遇到時(shí)需要訪問github問題,因?yàn)樘摂M機(jī)中沒有代理一次,下載很慢,有時(shí)甚至下載不下來
解決
1. 代理設(shè)置
我這里用的clash,其他同理

image.png
2. 找到本地虛擬的網(wǎng)卡

image.png
3. 服務(wù)器內(nèi)暴露代理
臨時(shí)暴露,不建議加入環(huán)境變量。
注意:這里都是代理到http協(xié)議,如果寫了https會(huì)導(dǎo)致訪問不通
export http_proxy=http://192.168.1.1:7890
export https_proxy=http://192.168.1.1:7890
4. 驗(yàn)證
curl -v github.com
返回鏈接狀態(tài)則說明代理成功

image.png