V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
BestChen
V2EX  ›  NGINX

笨比求教如何反代 github

  •  
  •   BestChen · 2021-05-28 20:49:53 +08:00 · 4373 次点击
    这是一个创建于 1035 天前的主题,其中的信息可能已经有所发展或是发生改变。

    jsdelivr.net 加速实在不稳定,有时候直接加载不上.

    有没有什么笨比式的反代加速方法,笨比一个实在不会折腾。。

    6 条回复    2021-05-29 11:37:29 +08:00
    stille
        1
    stille  
       2021-05-28 20:56:55 +08:00 via iPhone
    Jays
        2
    Jays  
       2021-05-28 20:59:55 +08:00
    hosts 目前还可以
    XIU2
        3
    XIU2  
       2021-05-28 21:40:32 +08:00
    反代加速 Github 文件的项目已经有个 gh-proxy 了,可以尝试自己搭建,也可以用别人公益搭建的~

    github.com/XIU2/UserScript
    greasyfork.org/zh-CN/scripts/412245
    高速下载 Git Clone/SSH 、Release 、Raw 、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
    ByteCat
        4
    ByteCat  
       2021-05-28 23:02:31 +08:00
    ik
        5
    ik  
       2021-05-29 11:34:48 +08:00 via iPhone
    刚刚试了下我自己用的,支持 git clone

    例如: git clone https://servername/https/github.com/nginx/nginx


    location ~ ( http|https)/([\w\-\.\:]+)/(.*) {
    proxy_pass $1://$2/$3$is_args$args;

    proxy_ssl_server_name on;
    proxy_ssl_name "$2";
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Host "$2";
    proxy_set_header Upgrade "$http_upgrade";
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Real-IP "$remote_addr";
    proxy_set_header X-Forwarded-For "$proxy_ad d_x_forwarded_for";
    }
    ik
        6
    ik  
       2021-05-29 11:37:29 +08:00 via iPhone
    @ik 配合 cf,拉这个 nginx 仓库,能在半分钟内搞定
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3790 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:54 · PVG 08:54 · LAX 17:54 · JFK 20:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.