该项目来自GitHub: https://github.com/hunshcn/gh-proxy
我用的docker版运行在美国服务器上面,然后用域名反代玩,亲测相当好用;
怎么玩?目前我用的https://github.buwanle.xyz在运行gh-proxy项目,可以进网站加速下载Github项目,也可以直接操作,如下:
git clone https://github.buwanle.xyz/https://github.com/WordPress/WordPress
#或者
wget https://github.buwanle.xyz/https://github.com/***/***-core/releases/download/***/***-linux-$MACHINE.zip
加速有风险所以https://github.buwanle.xyz这个域名是个临时域名,服务器带宽20M,这个项目可能会长期用,以后换域名此处会同步更改;
下面是我玩的步骤整理
一、docker运行
没安装docker看这个一键安装docker:http://blog.520.fi/21803.html
docker run -d --name="gh-proxy-py" \
-p 0.0.0.0:12345:80 \
--restart=always \
hunsh/gh-proxy-py:latest
二、Nginx反代
server
{
listen 80;
#listen [::]:80;
server_name 填写自己的域名 ;
index index.html index.htm index.js default.html default.htm default.php;
location / {
proxy_pass http://127.0.0.1:12345;
index index.html index.htm index.jsp;
access_log off;
}
}
server
{
listen 443 ssl http2;
server_name 填写自己的域名 ;
index index.html index.htm index.js default.html default.htm default.php;
ssl_certificate /etc/nginx/ssl/证书.crt;
ssl_certificate_key /etc/nginx/ssl/证书.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
location / {
proxy_pass http://127.0.0.1:12345;
index index.html index.htm index.jsp;
access_log off;
}
access_log off;
}
文章评论