Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
3 changes: 3 additions & 0 deletions .env.prod.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ ENABLE_PROXY = false
## 代理配置
PROXY_URL = "https://your-proxy-url.com/?proxy="

### 随机IP设置
## 启用随机中国IP(默认关闭);启用后,所有请求默认使用随机中国IP,除非请求参数randomCNIP显式关闭
ENABLE_RANDOM_CN_IP = false

### UnblockNeteaseMusic 设置项
## 启用全局解灰, 无论是否调用参数都会使用解灰(不推荐开启)
Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ $ sudo docker run -d -p 3000:3000 ncm-api
| **CORS_ALLOW_ORIGIN** | `*` | 允许跨域请求的域名。可填写单个源,或使用逗号分隔多个源(例如 `https://a.com,https://b.com`)。 |
| **ENABLE_PROXY** | `false` | 是否启用反向代理功能。 |
| **PROXY_URL** | `https://your-proxy-url.com/?proxy=` | 代理服务地址。仅当 `ENABLE_PROXY=true` 时生效。 |
| **ENABLE_RANDOM_CN_IP** | `false` | 是否默认启用随机中国IP。启用后,所有请求默认使用随机中国IP,除非请求参数 `randomCNIP` 显式关闭。 |
| **ENABLE_GENERAL_UNBLOCK** | `true` | 是否启用全局解灰(推荐开启)。开启后所有歌曲都尝试自动解锁。 |
| **ENABLE_FLAC** | `true` | 是否启用无损音质(FLAC)。 |
| **SELECT_MAX_BR** | `false` | 启用无损音质时,是否选择最高码率音质。 |
Expand Down
2 changes: 1 addition & 1 deletion util/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const createOption = (query, crypto = '') => {
ua: query.ua || '',
proxy: query.proxy,
realIP: query.realIP,
randomCNIP: query.randomCNIP || false,
randomCNIP: process.env.ENABLE_RANDOM_CN_IP === 'true' ? (query.randomCNIP !== 'false' && query.randomCNIP !== false) : (query.randomCNIP === 'true' || query.randomCNIP === true),
Comment thread
SunsetMkt marked this conversation as resolved.
Outdated
Comment thread
SunsetMkt marked this conversation as resolved.
Outdated
Comment thread
SunsetMkt marked this conversation as resolved.
Outdated
e_r: query.e_r || undefined,
domain: query.domain || '',
checkToken: query.checkToken || false,
Expand Down