diff --git a/.dockerignore b/.dockerignore index 9d62d4a..5f40f37 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,9 +7,9 @@ !/app.js !/server.js !/package.json -!/package-lock.json !/index.js !/generateConfig.js !/main.js !/data -!/.env \ No newline at end of file +!/.env +!/pnpm-lock.yaml \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8f8ca26..a636cd4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,7 +16,7 @@ updates: # 自动合并小版本更新的 PR (可选) # 可以设置针对 patch 或 minor 版本更新自动合并 commit-message: - prefix: "chore(packages):" # PR 合并提交信息的前缀 + prefix: "build(packages):" # PR 合并提交信息的前缀 # 更新 GitHub Actions 依赖 - package-ecosystem: "github-actions" diff --git a/precompiled/app-linux/app b/precompiled/app-linux/app deleted file mode 100644 index 3f2cd2f..0000000 Binary files a/precompiled/app-linux/app and /dev/null differ diff --git a/precompiled/app-macos/app b/precompiled/app-macos/app deleted file mode 100644 index 71389c2..0000000 Binary files a/precompiled/app-macos/app and /dev/null differ diff --git a/precompiled/app-win/app.exe b/precompiled/app-win/app.exe deleted file mode 100644 index be48b7e..0000000 Binary files a/precompiled/app-win/app.exe and /dev/null differ diff --git a/public/docs/home.md b/public/docs/home.md index 4f6c782..593cbbf 100644 --- a/public/docs/home.md +++ b/public/docs/home.md @@ -2,6 +2,8 @@ 网易云音乐 NodeJS API Enhanced +最后更新于: 2026.2.15 + ## 灵感来自 [disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music) diff --git a/server.js b/server.js index f4b4ebc..a9f53db 100644 --- a/server.js +++ b/server.js @@ -227,20 +227,23 @@ async function consturctServer(moduleDefs) { const moduleResponse = await moduleDef.module(query, (...params) => { // 参数注入客户端IP const obj = [...params] - // 获取请求中的 IP 参数 - let ip = req.ip + const options = obj[2] || {} + if (!options.randomCNIP) { + let ip = req.ip - if (ip.substring(0, 7) == '::ffff:') { - ip = ip.substring(7) - } - if (ip == '::1') { - ip = global.cnIp - } - // logger.info('Requested from ip:', ip) - obj[2] = { - ...(obj[2] || {}), - ip, + if (ip.substring(0, 7) == '::ffff:') { + ip = ip.substring(7) + } + if (ip == '::1') { + ip = global.cnIp + } + // logger.info('Requested from ip:', ip) + obj[2] = { + ...options, + ip, + } } + return request(...obj) }) logger.info(`Request Success: ${decode(req.originalUrl)}`)