阿里云等国内服务器github加速


阿里云等国内服务器github加速

解决在阿里云等国内的服务器上从github上拉代码,但网络不通的情况。

准备一个v2ray节点

步骤:

安装v2ray

wget https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh  --user-agent="Mozilla/5.0"

如果下载不下来,请通过ftp等方式上传

运行下载的脚本

bash install-release.sh

这个过程时间会有点长,但实测阿里云网络可以安装

运行v2ray

systemctl start v2ray

image-20220129233139100

修改配置文件

在你的Windows 等v2ray客户端下,将配置文件config.json的内容复制到/usr/local/etc/v2ray/config.json

方法:

image-20220129233337800

重启v2ray

使用下命名可测试节点

/usr/local/bin/v2ray -test -config /usr/local/etc/v2ray/config.json

image-20220129233516568

检查端口是否通畅

lsof -i:10809

image-20220129233619810

lsof没有命令的可yum install lsof

添加github代理

git config --global http.proxy http://127.0.0.1:10809
git config --global https.proxy http://127.0.0.1:10809

此时再克隆代码速度飞快

image-20220129233925182


文章作者: Jayce he
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Jayce he !
评论
  目录