在同步webrtc代码,使用gclient sync,如下只给git配置socks5代理总会失败。
[http]
proxy = socks5://127.0.0.1:22222
[https]
proxy = socks5://127.0.0.1:22222
会报如下错误
____running cipd ensure -log-level error -root /home/xxx/webrtc/webrtc-checkout -ensure-file /tmp/tmpSfax2e.ensure in .
Errors:
failed to resolve infra/tools/luci/isolate/linux-amd64@git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c (line 4): Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: dial tcp 64.13.232.149:443: i/o timeout
failed to resolve infra/tools/luci/isolated/linux-amd64@git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c (line 5): Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: dial tcp 64.13.232.149:443: i/o timeout
failed to resolve infra/tools/luci/swarming/linux-amd64@git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c (line 6): Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: dial tcp 64.13.232.149:443: i/o timeout
Error: Command cipd ensure -log-level error -root /home/xxx/webrtc/webrtc-checkout -ensure-file /tmp/tmpSfax2e.ensure returned non-zero exit status 1 分析发现是gclient会访问一些被墙掉的网址,需要配置http的全局代理。
解决使用polipo,将socks5代理转换成全局的http代理。
1.安装polipo
sudo apt-get install polipo
2.配置polipo, vi /etc/polipo/config 添加
socksParentProxy=127.0.0.1:22223
3.重启服务
sudo service polipo restart
4.配置全局http代理
export http_proxy=127.0.0.1:8123
export https_proxy=127.0.0.1:8123
5.这时gclient sync就能成功了免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:使用polipo解决webrtc gclient sync失败的问题 https://www.yhzz.com.cn/a/19024.html