{"id":13441756,"url":"https://github.com/nondanee/UnblockNeteaseMusic","last_synced_at":"2025-03-20T12:32:46.103Z","repository":{"id":37319076,"uuid":"137946752","full_name":"nondanee/UnblockNeteaseMusic","owner":"nondanee","description":"Revive unavailable songs for Netease Cloud Music","archived":false,"fork":false,"pushed_at":"2023-06-25T22:31:49.000Z","size":1775,"stargazers_count":17406,"open_issues_count":215,"forks_count":2509,"subscribers_count":236,"default_branch":"master","last_synced_at":"2024-10-14T10:43:45.791Z","etag":null,"topics":["netease-cloud-music","proxy-server","unblocker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nondanee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-19T21:18:41.000Z","updated_at":"2024-10-14T09:20:23.000Z","dependencies_parsed_at":"2022-07-13T17:20:33.794Z","dependency_job_id":"3c3928cf-7bb9-4ef0-9447-ac359e9c6b54","html_url":"https://github.com/nondanee/UnblockNeteaseMusic","commit_stats":{"total_commits":401,"total_committers":11,"mean_commits":36.45454545454545,"dds":0.06234413965087282,"last_synced_commit":"b8d5f4b4fe59cef9c021b99f3cf2606d99fa4790"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nondanee%2FUnblockNeteaseMusic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nondanee%2FUnblockNeteaseMusic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nondanee%2FUnblockNeteaseMusic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nondanee%2FUnblockNeteaseMusic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nondanee","download_url":"https://codeload.github.com/nondanee/UnblockNeteaseMusic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221760150,"owners_count":16876362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["netease-cloud-music","proxy-server","unblocker"],"created_at":"2024-07-31T03:01:37.715Z","updated_at":"2025-03-20T12:32:46.097Z","avatar_url":"https://github.com/nondanee.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS","Uncategorized","JavaScript","JavaScript (485)","其他"],"sub_categories":["Windows Manager","Uncategorized","网络服务_其他"],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/26399680/47980314-0e3f1700-e102-11e8-8857-e3436ecc8beb.png\" alt=\"logo\" width=\"140\" height=\"140\" align=\"right\"\u003e\n\n# UnblockNeteaseMusic\n\n解锁网易云音乐客户端变灰歌曲\n\n## 特性\n\n- 使用 QQ / 虾米 / 百度 / 酷狗 / 酷我 / 咪咕 / JOOX 音源替换变灰歌曲链接 (默认仅启用一、五、六)\n- 为请求增加 `X-Real-IP` 参数解锁海外限制，支持指定网易云服务器 IP，支持设置上游 HTTP / HTTPS 代理\n- 完整的流量代理功能 (HTTP / HTTPS)，可直接作为系统代理 (同时支持 PAC)\n\n## 运行\n\n使用 npx\n\n```\n$ npx @nondanee/unblockneteasemusic\n```\n\n或使用 Docker\n\n```\n$ docker run nondanee/unblockneteasemusic\n```\n\n```\n$ docker-compose up\n```\n\n### 配置参数\n\n```\n$ unblockneteasemusic -h\nusage: unblockneteasemusic [-v] [-p port] [-a address] [-u url] [-f host]\n                           [-o source [source ...]] [-t token] [-e url] [-s]\n                           [-h]\n\noptional arguments:\n  -v, --version                   output the version number\n  -p port, --port port            specify server port\n  -a address, --address address   specify server host\n  -u url, --proxy-url url         request through upstream proxy\n  -f host, --force-host host      force the netease server ip\n  -o source [source ...], --match-order source [source ...]\n                                  set priority of sources\n  -t token, --token token         set up proxy authentication\n  -e url, --endpoint url          replace virtual endpoint with public host\n  -s, --strict                    enable proxy limitation\n  -h, --help                      output usage information\n```\n\n## 使用\n\n**警告：本项目不提供线上 demo，请不要轻易信任使用他人提供的公开代理服务，以免发生安全问题**\n\n**若将服务部署到公网，强烈建议使用严格模式 (此模式下仅放行网易云音乐所属域名的请求) `-s`  限制代理范围 (需使用 PAC 或 hosts)，~~或启用 Proxy Authentication `-t \u003cname\u003e:\u003cpassword\u003e` 设置代理用户名密码~~ (目前密码认证在 Windows 客户端设置和 macOS 系统设置都无法生效，请不要使用)，以防代理被他人滥用**\n\n支持 Windows 客户端，UWP 客户端，Android 客户端，Linux 客户端 (1.2 版本以上需要自签证书 MITM，启动客户端需要增加 `--ignore-certificate-errors` 参数)，macOS 客户端 (726 版本以上需要自签证书)，iOS 客户端 (配置 https endpoint 或使用自签证书) 和网页版 (需要自签证书，需要脚本配合)\n\n目前除 UWP 外其它客户端均优先请求 HTTPS 接口，默认配置下本代理对网易云所有 HTTPS API 连接返回空数据，促使客户端降级使用 HTTP 接口 (新版 Linux 客户端和 macOS 客户端已无法降级)\n\n因 UWP 应用存在网络隔离，限制流量发送到本机，若使用的代理在 localhost，或修改的 hosts 指向 localhost，需为 \"网易云音乐 UWP\" 手动开启 loopback 才能使用，请以**管理员身份**执行命令\n\n```powershell\nchecknetisolation loopbackexempt -a -n=\"1F8B0F94.122165AE053F_j2p0p5q0044a6\"\n```\n\n### 方法 1. 修改 hosts\n\n向 hosts 文件添加两条规则\n\n```\n\u003cServer IP\u003e music.163.com\n\u003cServer IP\u003e interface.music.163.com\n```\n\n\u003e 使用此方法必须监听 80 端口 `-p 80` \n\u003e\n\u003e **若在本机运行程序**，请指定网易云服务器 IP `-f xxx.xxx.xxx.xxx` (可在修改 hosts 前通过 `ping music.163.com` 获得) **或** 使用代理 `-u http(s)://xxx.xxx.xxx.xxx:xxx`，以防请求死循环\n\u003e\n\u003e **Android 客户端下修改 hosts 无法直接使用**，原因和解决方法详见[云音乐安卓又搞事啦](https://jixun.moe/post/netease-android-hosts-bypass/)，[安卓免 root 绕过网易云音乐 IP 限制](https://jixun.moe/post/android-block-netease-without-root/)\n\n### 方法 2. 设置代理\n\nPAC 自动代理脚本地址 `http://\u003cServer Name:PORT\u003e/proxy.pac`\n\n全局代理地址填写服务器地址和端口号即可\n\n| 平台    | 基础设置 |\n| :------ | :------------------------------- |\n| Windows | 设置 \u003e 工具 \u003e 自定义代理 (客户端内) |\n| UWP     | Windows 设置 \u003e 网络和 Internet \u003e 代理 |\n| Linux   | 系统设置 \u003e 网络 \u003e 网络代理 |\n| macOS   | 系统偏好设置 \u003e 网络 \u003e 高级 \u003e 代理 |\n| Android | WLAN \u003e 修改网络 \u003e 高级选项 \u003e 代理 |\n| iOS     | 无线局域网 \u003e HTTP 代理 \u003e 配置代理 |\n\n\u003e 代理工具和方法有很多请自行探索，欢迎在 issues 讨论\n\n### ✳方法 3. 调用接口\n\n作为依赖库使用\n\n```\n$ npm install @nondanee/unblockneteasemusic\n```\n\n```javascript\nconst match = require('@nondanee/unblockneteasemusic')\n\n/** \n * Set proxy or hosts if needed\n */\nglobal.proxy = require('url').parse('http://127.0.0.1:1080')\nglobal.hosts = {'i.y.qq.com': '59.37.96.220'}\n\n/**\n * Find matching song from other platforms\n * @param {Number} id netease song id\n * @param {Array\u003cString\u003e||undefined} source support qq, xiami, baidu, kugou, kuwo, migu, joox\n * @return {Promise\u003cObject\u003e}\n */\nmatch(418602084, ['qq', 'kuwo', 'migu']).then(console.log)\n```\n\n## 效果\n\n#### Windows 客户端\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26399680/60316017-87de8a80-999b-11e9-9381-16d40efbe7f6.png\" width=\"100%\"\u003e\n\n#### UWP 客户端\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26399680/52215123-5a028780-28ce-11e9-8491-08c4c5dac3b4.png\" width=\"100%\"\u003e\n\n#### Linux 客户端\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26399680/60316169-18b56600-999c-11e9-8ae5-5cd168b0edae.png\" width=\"100%\"\u003e\n\n#### macOS 客户端\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26399680/52196035-51418f80-2895-11e9-8f33-78a631cdf151.png\" width=\"100%\"\u003e\n\n#### Android 客户端\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26399680/57972549-eabd2900-79ce-11e9-8fef-95cb60906298.png\" width=\"50%\"\u003e\n\n#### iOS 客户端\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26399680/57972440-f90a4580-79cc-11e9-8dbf-6150ee299b9c.jpg\" width=\"50%\"\u003e\n\n## 致谢\n\n感谢大佬们为逆向 eapi 所做的努力\n\n使用的其它平台音源 API 出自\n\n[trazyn/ieaseMusic](https://github.com/trazyn/ieaseMusic)\n\n[listen1/listen1_chrome_extension](https://github.com/listen1/listen1_chrome_extension)\n\n向所有同类项目致敬\n\n[EraserKing/CloudMusicGear](https://github.com/EraserKing/CloudMusicGear)\n\n[EraserKing/Unblock163MusicClient](https://github.com/EraserKing/Unblock163MusicClient)\n\n[ITJesse/UnblockNeteaseMusic](https://github.com/ITJesse/UnblockNeteaseMusic/)\n\n[bin456789/Unblock163MusicClient-Xposed](https://github.com/bin456789/Unblock163MusicClient-Xposed)\n\n[YiuChoi/Unlock163Music](https://github.com/YiuChoi/Unlock163Music)\n\n[yi-ji/NeteaseMusicAbroad](https://github.com/yi-ji/NeteaseMusicAbroad)\n\n[stomakun/NeteaseReverseLadder](https://github.com/stomakun/NeteaseReverseLadder/)\n\n[fengjueming/unblock-NetEaseMusic](https://github.com/fengjueming/unblock-NetEaseMusic)\n\n[acgotaku/NetEaseMusicWorld](https://github.com/acgotaku/NetEaseMusicWorld)\n\n[mengskysama/163-Cloud-Music-Unlock](https://github.com/mengskysama/163-Cloud-Music-Unlock)\n\n[azureplus/163-music-unlock](https://github.com/azureplus/163-music-unlock)\n\n[typcn/163music-mac-client-unlock](https://github.com/typcn/163music-mac-client-unlock)\n\n## 许可\n\nThe MIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnondanee%2FUnblockNeteaseMusic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnondanee%2FUnblockNeteaseMusic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnondanee%2FUnblockNeteaseMusic/lists"}