Skip to content

Commit

Permalink
Chore: 更新加速镜像 (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
crossgg authored Nov 20, 2024
1 parent cac1aaa commit fdcc02d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ class websocket:


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

# 全局代理域名列表相关设置
## proxies为全局代理域名列表, 默认为空[], 表示不启用全局代理;
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ services:
# - WS_MAX_MESSAGE_SIZE=10485760
# - WS_MAX_QUEUE_SIZE=100
# - WS_MAX_CONNECTIONS_SUBSCRIBE=30
# - SUBSCRIBE_ACCELERATE_URL=jsdelivr_cdn
# - SUBSCRIBE_ACCELERATE_URL=ghproxy
# - PROXIES=
# - PROXY_DIRECT_MODE=regexp
# - PROXY_DIRECT=(?xi)\A([a-z][a-z0-9+\-.]*://)?(0(.0){3}|127(.0){2}.1|localhost|\[::([\d]+)?\])(:[0-9]+)?
Expand Down
2 changes: 1 addition & 1 deletion web/docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ python ./chrole.py [email protected] admin
|WS_MAX_MESSAGE_SIZE|No|10485760|WebSocket maximum message size, the default is 10485760 bytes|
|WS_MAX_QUEUE_SIZE|No|100|WebSocket maximum queue size, the default is 100|
|WS_MAX_CONNECTIONS_SUBSCRIBE|No|30|WebSocket subscribe page maximum number of connections, the default is 30|
|SUBSCRIBE_ACCELERATE_URL|No|jsdelivr_cdn|Subscribe page acceleration URL, the default is jsdelivr_cdn, <br>[See configuration for details](https://github.com/qd-today/qd/blob/master/config.py)...|
|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)...|

> For details, please refer to [config.py](https://github.com/qd-today/qd/blob/master/config.py)
2 changes: 1 addition & 1 deletion web/handlers/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def update(self, userid):
elif config.subscribe_accelerate_url == 'jsdelivr_fastly':
url = f"{repo['repourl'].replace('https://github.com/', 'https://fastly.jsdelivr.net/gh/')}@{repo['repobranch']}"
elif config.subscribe_accelerate_url == 'ghproxy':
url = f"{repo['repourl'].replace('https://github.com/', 'https://ghproxy.com/https://raw.githubusercontent.com/')}/{repo['repobranch']}"
url = f"{repo['repourl'].replace('https://github.com/', 'https://ghp.ci/https://raw.githubusercontent.com/')}/{repo['repobranch']}"
elif config.subscribe_accelerate_url == 'fastgit':
url = f"{repo['repourl'].replace('https://github.com/', 'https://raw.fastgit.org/')}/{repo['repobranch']}"
else:
Expand Down

0 comments on commit fdcc02d

Please sign in to comment.