@@ -71,31 +71,18 @@ https://github.com/user/repo/releases/download/v1.0.0/file.tar.gz
7171
7272# 加速链接
7373https://yourdomain.com/https://github.com/user/repo/releases/download/v1.0.0/file.tar.gz
74- ```
75-
7674
75+ # 加速下载仓库
76+ git clone https://yourdomain.com/https://github.com/sky22333/hubproxy.git
77+ ```
7778
7879## ⚙️ 配置
7980
80- 容器内的配置文件位于 ` /root/config.toml `
81-
82- 脚本部署配置文件位于 ` /opt/hubproxy/config.toml `
83-
84- 为了IP限流能够正常运行,反向代理需要传递IP头用来获取访客真实IP,以caddy为例:
85- ```
86- example.com {
87- reverse_proxy 127.0.0.1:5000 {
88- header_up X-Forwarded-For {http.request.header.CF-Connecting-IP}
89- header_up X-Real-IP {http.request.header.CF-Connecting-IP}
90- header_up X-Forwarded-Proto https
91- header_up X-Forwarded-Host {host}
92- }
93- }
94- ```
81+ <details >
82+ <summary >config.toml配置说明</summary >
9583
96- ### ` config.toml ` 配置示例
84+ 此配置是默认配置
9785
98- 不配置也可以,程序内置有默认值
9986```
10087[server]
10188host = "0.0.0.0"
@@ -193,6 +180,35 @@ enabled = true
193180defaultTTL = "20m"
194181```
195182
183+ </details >
184+
185+ 容器内的配置文件位于 ` /root/config.toml `
186+
187+ 脚本部署配置文件位于 ` /opt/hubproxy/config.toml `
188+
189+ 为了IP限流能够正常运行,反向代理需要传递IP头用来获取访客真实IP,以caddy为例:
190+ ```
191+ example.com {
192+ reverse_proxy {
193+ to 127.0.0.1:5000
194+ header_up X-Real-IP {remote}
195+ header_up X-Forwarded-For {remote}
196+ header_up X-Forwarded-Proto {scheme}
197+ }
198+ }
199+ ```
200+ cloudflare CDN:
201+ ```
202+ example.com {
203+ reverse_proxy 127.0.0.1:5000 {
204+ header_up X-Forwarded-For {http.request.header.CF-Connecting-IP}
205+ header_up X-Real-IP {http.request.header.CF-Connecting-IP}
206+ header_up X-Forwarded-Proto https
207+ header_up X-Forwarded-Host {host}
208+ }
209+ }
210+ ```
211+
196212
197213
198214## ⚠️ 免责声明
0 commit comments