Skip to content

Commit d75cfdd

Browse files
authored
更新自建加速镜像 (#584)
* 更新自建加速镜像 * 更新 faq.md
1 parent f547aeb commit d75cfdd

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

config.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ class websocket:
144144

145145

146146
# 订阅加速方式或地址, 用于加速公共模板更新, 仅适用于 GitHub.
147-
# 可选 jsdelivr_cdn/jsdelivr_fastly/ghproxy/fastgit/自定义地址, 默认为: ghproxy
148-
# 自定义地址示例为: https://ghp.ci/https://raw.githubusercontent.com/ 或 https://raw.fastgit.org/
147+
# 可选 jsdelivr_cdn/jsdelivr_fastly/ghproxy/qd-ph/自定义地址, 默认为: qd-ph
148+
# 自定义地址示例为: https://qd-gh.crossg.us.kg/https://raw.githubusercontent.com/
149149
# 以直接替换 https://raw.githubusercontent.com/ 源文件地址.
150-
subscribe_accelerate_url = os.getenv('SUBSCRIBE_ACCELERATE_URL', 'ghproxy')
150+
subscribe_accelerate_url = os.getenv('SUBSCRIBE_ACCELERATE_URL', 'qd-ph')
151151

152152
# 全局代理域名列表相关设置
153153
## proxies为全局代理域名列表, 默认为空[], 表示不启用全局代理;

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ services:
7373
# - WS_MAX_MESSAGE_SIZE=10485760
7474
# - WS_MAX_QUEUE_SIZE=100
7575
# - WS_MAX_CONNECTIONS_SUBSCRIBE=30
76-
# - SUBSCRIBE_ACCELERATE_URL=ghproxy
76+
# - SUBSCRIBE_ACCELERATE_URL=qd-ph
7777
# - PROXIES=
7878
# - PROXY_DIRECT_MODE=regexp
7979
# - PROXY_DIRECT=(?xi)\A([a-z][a-z0-9+\-.]*://)?(0(.0){3}|127(.0){2}.1|localhost|\[::([\d]+)?\])(:[0-9]+)?

web/docs/guide/deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,6 @@ python ./chrole.py your@email.address admin
186186
|WS_MAX_MESSAGE_SIZE|No|10485760|WebSocket maximum message size, the default is 10485760 bytes|
187187
|WS_MAX_QUEUE_SIZE|No|100|WebSocket maximum queue size, the default is 100|
188188
|WS_MAX_CONNECTIONS_SUBSCRIBE|No|30|WebSocket subscribe page maximum number of connections, the default is 30|
189-
|SUBSCRIBE_ACCELERATE_URL|No|ghproxy|Subscribe page acceleration URL, the default is ghproxy, <br>[See configuration for details](https://github.com/qd-today/qd/blob/master/config.py)...|
189+
|SUBSCRIBE_ACCELERATE_URL|No|qd-ph|Subscribe page acceleration URL, the default is qd-ph, <br>[See configuration for details](https://github.com/qd-today/qd/blob/master/config.py)...|
190190

191191
> For details, please refer to [config.py](https://github.com/qd-today/qd/blob/master/config.py)

web/docs/zh_CN/guide/faq.md

+11
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,14 @@ QD 使用 `pycurl` 模块来发送 HTTP Proxy 请求。如果没有安装 `pycur
143143
> }
144144
> }
145145
> ```
146+
147+
## 错误代码:4006
148+
> 提示错误信息为:"更新失败,原因:Cannot connect to host xxx.xxx:443ssl:False"
149+
150+
报错原因:github/或github加速源无法连接。
151+
152+
解决方法1:挂代理
153+
154+
解决方法2:更换github加速源
155+
容器的环境变量中增加/修改`SUBSCRIBE_ACCELERATE_URL=https://xxx.xxx/https://raw.githubusercontent.com/`
156+
`https://xxx.xxx/`替换为可用的加速源,找不到加速源的可以参考 https://ghproxy.link/中发布的加速源

web/handlers/subscribe.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ async def update(self, userid):
9090
elif config.subscribe_accelerate_url == 'jsdelivr_fastly':
9191
url = f"{repo['repourl'].replace('https://github.com/', 'https://fastly.jsdelivr.net/gh/')}@{repo['repobranch']}"
9292
elif config.subscribe_accelerate_url == 'ghproxy':
93-
url = f"{repo['repourl'].replace('https://github.com/', 'https://ghp.ci/https://raw.githubusercontent.com/')}/{repo['repobranch']}"
94-
elif config.subscribe_accelerate_url == 'fastgit':
95-
url = f"{repo['repourl'].replace('https://github.com/', 'https://raw.fastgit.org/')}/{repo['repobranch']}"
93+
url = f"{repo['repourl'].replace('https://github.com/', 'https://ghfast.top/https://raw.githubusercontent.com/')}/{repo['repobranch']}"
94+
elif config.subscribe_accelerate_url == 'qd-ph':
95+
url = f"{repo['repourl'].replace('https://github.com/', 'https://qd-gh.crossg.us.kg/https://raw.githubusercontent.com/')}/{repo['repobranch']}"
9696
else:
9797
if config.subscribe_accelerate_url.endswith('/'):
9898
url = f"{repo['repourl'].replace('https://github.com/', config.subscribe_accelerate_url)}/{repo['repobranch']}"

0 commit comments

Comments
 (0)