Git Product home page Git Product logo

gh-proxy-pro's Introduction

gh-proxy-pro

免责声明:本项目仅做学习使用,如果使用到您的网站,您不满意,请联系我删除。

项目优点:几乎不使用worker的流量,worker仅仅做重定向的工作,极小减轻了本地或者worker的压力

在 Cloudflare Workers 上部署 GH-Proxy-Pro 的指南

第一步:注册 Cloudflare Workers

首先,打开 Cloudflare 官网 进入面板后创建woker项目,如果你还没有账户,需要进行注册。完成注册并登录后,点击“Start building”按钮开始你的项目。

第二步:创建 Worker 和选择子域名

系统会引导你选择一个子域名,这将是你的 Worker 访问地址的一部分。选择一个对你来说意义重大且易于记忆的名称。完成后,点击“Create a Worker”进入编程界面。

第三步:部署代码

在这一步,你将需要 index.js 的代码。这段代码是 GH-Proxy 服务的核心,负责处理然后重定向。你可以在 GitHub 仓库中找到这段代码

index.js 的内容复制到 Cloudflare Workers 编辑器的左侧代码框中。检查无误后,点击“Save and Deploy”。如果一切顺利,你将在右侧预览窗口看到服务的首页。

第四步:配置环境变量

为了让你的 GH-Proxy 服务正常运行,你需要设置一些环境变量。回到你的 Worker 设置页面,寻找环境变量设置部分,并添加以下两个环境变量:

  • GH_URLS:这个变量应该包含一系列网络上公开的、可以用来反代 GitHub 的网站地址。
  • TARGET_URLS:这个变量则应包括一些网上公开的、部署 GH-Proxy 服务的网站地址。

你可以使用 FOFA 或其他网络搜索工具来获取这些地址。此外,本仓库中也提供了一些已经测试过的链接,你可以直接使用或者自行寻找合适的资源。

结语

通过以上步骤,你应该已经成功部署了自己的 GH-Proxy-Pro 服务。

鸣谢

raw加速的国内开源大佬,https://github.com/54ayao/Chinajsdelivr 为我们提供了国内加速服务,请大家合规使用,感谢。

(参考链接:https://github.com/hunshcn/gh-proxy/

gh-proxy-pro's People

Contributors

xiaozhou26 avatar habacat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.