Skip to content

Commit a6c93a2

Browse files
authored
Update README.md
1 parent 3da3ab0 commit a6c93a2

File tree

1 file changed

+85
-2
lines changed

1 file changed

+85
-2
lines changed

README.md

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,89 @@
11
# gh-proxy
22

3-
## 我的修改
3+
本项目是一个解决github脚本和资源访问不通问题的方案, 示例
4+
https://youtu.be/F9re4Tuy7BA
5+
6+
可以对github脚本的无限嵌套调用提供解决方案, 示例
7+
https://youtu.be/5zCJsCoi_lQ
8+
9+
## 免费使用 cloudflare worker 搭后端服务
10+
11+
注册 Cloudflare 用户, 略
12+
13+
创建 worker
14+
15+
<img width="950" height="633" alt="image" src="https://github.com/user-attachments/assets/790c36b5-aeb8-4952-8026-e7050636b6e1" />
16+
17+
<img width="850" height="678" alt="image" src="https://github.com/user-attachments/assets/d3400eff-4d59-4f51-999b-027759afefb1" />
18+
19+
<img width="933" height="825" alt="image" src="https://github.com/user-attachments/assets/457aaf89-059c-46b4-a44d-d7629730df3a" />
20+
21+
修改 worker 的代码
22+
23+
<img width="966" height="420" alt="image" src="https://github.com/user-attachments/assets/dda591ab-ac2b-41f8-8c3c-c7cb4e587ae8" />
24+
25+
默认内容全部删掉
26+
27+
<img width="788" height="683" alt="image" src="https://github.com/user-attachments/assets/201e4b11-ae2f-43c2-9dbe-4f7ffc863f62" />
28+
29+
把本项目的 worker.js 内容复制粘贴过去
30+
https://github.com/crazypeace/gh-proxy/raw/refs/heads/master/worker.js
31+
32+
右上角 Deploy 部署
33+
34+
<img width="1310" height="631" alt="image" src="https://github.com/user-attachments/assets/c47dd616-84d2-4256-95ce-445200de8aef" />
35+
36+
这样, 你就得到了一个 ghproxy 后端
37+
https://worker项目名.cloudflare用户名.workers.dev/
38+
39+
请注意, 在你想使用本项目的环境中, 检测一下能否访问ghproxy后端, 比如
40+
```
41+
curl -L https://worker项目名.cloudflare用户名.workers.dev/
42+
```
43+
如果不行, 你需要给你的 worker 套上你自己的域名.
44+
参考教程
45+
https://zelikk.blogspot.com/2022/05/domain-cloudflare-worker-dev.html
46+
47+
48+
## 用 python 搭后端服务
49+
python环境
50+
```
51+
apt install -y python3-pip
52+
pip3 install flask requests --break-system-packages
53+
```
54+
下载 ghproxy 文件
55+
```
56+
wget https://github.com/crazypeace/gh-proxy/raw/refs/heads/master/app/main.py
57+
wget https://github.com/crazypeace/gh-proxy/raw/refs/heads/master/app/uwsgi.ini
58+
```
59+
修改 main.py
60+
61+
<img width="869" height="133" alt="image" src="https://github.com/user-attachments/assets/a310854d-b0ff-4dd9-b373-03925484b390" />
62+
63+
图中的修改方式 有点"危险". 适合你自己临时跑起来, 用完了就关.
64+
长期使用的话, 还是要前面加个比如 caddy 套 https 然后反代.
65+
66+
## 使用方式
67+
68+
用下面这样的方式转换 github 一键脚本命令.
69+
举例, 假如你的ghproxy后端地址是 `https://ghproxy.crazypeace.workers.dev/` 那么,
70+
转换前
71+
```
72+
bash <(wget -qO- -o- https://git.io/v2ray.sh)
73+
```
74+
转换后
75+
```
76+
bash <(wget -qO- -o- https://ghproxy.crazypeace.workers.dev/https://git.io/v2ray.sh | perl -pe "$(curl -L https://ghproxy.crazypeace.workers.dev/perl-pe-para)")
77+
```
78+
79+
为了方便使用,做了个工具页面
80+
https://crazypeace.github.io/gh-proxy/
81+
82+
操作演示
83+
https://youtu.be/Cf5tWuGMm6U?si=Ne2odu_PKgJJX9Tc&t=164
84+
85+
86+
## 本项目相对于源项目的修改
487
[增加支持 api.github.com](https://zelikk.blogspot.com/2023/03/github-proxy-api-github-com.html)
588

689
增加支持 git.io
@@ -29,7 +112,7 @@ https://zelikk.blogspot.com/2023/07/replit-gh-proxy.html
29112
https://zelikk.blogspot.com/search/label/ghproxy
30113

31114
<details>
32-
<summary>原项目readme (点击展开)</summary>
115+
<summary>源项目readme (点击展开)</summary>
33116

34117
## 简介
35118

0 commit comments

Comments
 (0)