Skip to content

Commit 855c4e6

Browse files
committed
mod(doc): readme add PROXY_API
1 parent 1af3ef2 commit 855c4e6

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
用于OpenList获取部分网盘API的接口和页面
66

7-
部署地址:[OpenList Token 获取工具](https://api.oplist.org/)
7+
部署地址:[OpenList Token 获取工具 - 全球站点](https://api.oplist.org/)
8+
部署地址:[OpenList Token 获取工具 - 中国大陆](https://api.oplist.org/)
89

910
## 部署方法
1011

@@ -42,6 +43,7 @@ docker pull ghcr.io/openlistteam/openlist_api_server:latest
4243
docker run -d --name oplist-api-server \
4344
-p 3000:3000 \
4445
-e OPLIST_MAIN_URLS="api.example.com" \
46+
-e OPLIST_PROXY_API="gts.example.com" \
4547
-e OPLIST_ONEDRIVE_UID= `#optional` \
4648
-e OPLIST_ONEDRIVE_KEY= `#optional` \
4749
-e OPLIST_ALICLOUD_UID= `#optional` \
@@ -72,6 +74,7 @@ docker run -d --name oplist-api-server \
7274
| 变量名称 | 必要 | 变量类型 | 变量说明 |
7375
| -------------- | ---- | -------- |--------------------------|
7476
| `OPLIST_MAIN_URLS` || string | 绑定主域名,示例:api.example.com |
77+
| `OPLIST_PROXY_API` || string | 部署在大陆的节点需要指定代理谷歌 |
7578
| `OPLIST_ONEDRIVE_UID` || string | OneDrive 客户端ID |
7679
| `OPLIST_ONEDRIVE_KEY` || string | OneDrive 客户端密钥 |
7780
| `OPLIST_ALICLOUD_UID` || string | 阿里云盘开发者AppID |
@@ -113,6 +116,7 @@ cp wrangler.example.jsonc wrangler.encrypt.jsonc
113116
```
114117
"vars": {
115118
"MAIN_URLS": "api.example.com",
119+
"PROXY_API": "gts.example.com",
116120
"onedrive_uid": "*****************************",
117121
"onedrive_key": "*****************************",
118122
"alicloud_uid": "*****************************",
@@ -135,9 +139,10 @@ cp wrangler.example.jsonc wrangler.encrypt.jsonc
135139

136140
### 变量说明
137141

138-
| 变量名称 | 必要 | 变量类型 | 变量说明 |
139-
| -------------- | ---- | -------- |--------------------------|
142+
| 变量名称 | 必要 | 变量类型 | 变量说明 |
143+
| -------------- | ---- | -------- |-------------------|
140144
| `MAIN_URLS` || string | 绑定主域名,示例:api.example.com |
145+
| `PROXY_API` || string | 部署在大陆的节点需要指定代理谷歌 |
141146
| `onedrive_uid` || string | OneDrive 客户端ID |
142147
| `onedrive_key` || string | OneDrive 客户端密钥 |
143148
| `alicloud_uid` || string | 阿里云盘开发者AppID |

entrypoint-lite.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ else
88
sed -i "s|MAIN_URLS=.*|MAIN_URLS=${OPLIST_MAIN_URLS}|" .env
99
fi
1010

11+
#替换目录下wrangler文件中的MAIN_URLS
12+
if [ -z "${OPLIST_PROXY_API}" ]; then
13+
echo "PROXY_API is not set, skipping replacement."
14+
else
15+
echo "Replacing MAIN_URLS in wrangler file..."
16+
sed -i "s|\"PROXY_API\":.*|\"PROXY_API\": \"${OPLIST_PROXY_API}\",|" ./wrangler.jsonc
17+
fi
18+
1119
# 替换.env文件中的onedrive_uid
1220
if [ -z "${OPLIST_ONEDRIVE_UID}" ]; then
1321
echo "ONEDRIVE_UID is not set, skipping replacement."

entrypoint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ else
2525
echo "Replacing MAIN_URLS in wrangler file..."
2626
sed -i "s|\"MAIN_URLS\":.*|\"MAIN_URLS\": \"${OPLIST_MAIN_URLS}\",|" ./wrangler.jsonc
2727
fi
28+
#替换目录下wrangler文件中的PROXY_API
29+
if [ -z "${OPLIST_PROXY_API}" ]; then
30+
echo "PROXY_API is not set, skipping replacement."
31+
else
32+
echo "Replacing MAIN_URLS in wrangler file..."
33+
sed -i "s|\"PROXY_API\":.*|\"PROXY_API\": \"${OPLIST_PROXY_API}\",|" ./wrangler.jsonc
34+
fi
2835
#替换目录下wrangler文件中的onedrive_uid
2936
if [ -z "${OPLIST_ONEDRIVE_UID}" ]; then
3037
echo "ONEDRIVE_UID is not set, skipping replacement."

0 commit comments

Comments
 (0)