Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新加速镜像 #557

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading