Skip to content

Commit 9314925

Browse files
committed
refine metadata
1 parent add472a commit 9314925

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3080
-35
lines changed

UnblockNeteaseMusic/.dockerignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.git
2+
.npmignore
3+
.gitignore
4+
.dockerignore
5+
6+
LICENSE
7+
*.md
8+
9+
node_modules
10+
npm-debug.log
11+
12+
Dockerfile*
13+
*.yml
14+
15+
src/browser/
16+
ca.*
17+
*.worker.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
env:
12+
REPOSITORY: unblockneteasemusic
13+
DOCKER_USERNAME: nondanee
14+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
15+
steps:
16+
-
17+
name: Prepare
18+
id: prepare
19+
run: |
20+
ARCH=(amd64 arm/v6 arm/v7 arm64 386 ppc64le s390x)
21+
PLATFORM=$(printf ",linux/%s" "${ARCH[@]}")
22+
echo ::set-output name=build_platform::${PLATFORM:1}
23+
echo ::set-output name=image_name::${DOCKER_USERNAME}/${REPOSITORY}
24+
-
25+
name: Checkout
26+
uses: actions/checkout@v2
27+
-
28+
name: Setup Buildx
29+
uses: crazy-max/ghaction-docker-buildx@v1
30+
-
31+
name: Login
32+
run: |
33+
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
34+
-
35+
name: Build
36+
run: |
37+
docker buildx build \
38+
--tag ${{ steps.prepare.outputs.image_name }} \
39+
--platform ${{ steps.prepare.outputs.build_platform }} \
40+
--output "type=image,push=true" \
41+
--file Dockerfile .
42+
-
43+
name: Check Manifest
44+
run: |
45+
docker buildx imagetools inspect ${{ steps.prepare.outputs.image_name }}
46+
47+
npm:
48+
runs-on: ubuntu-latest
49+
steps:
50+
-
51+
name: Checkout
52+
uses: actions/checkout@v2
53+
-
54+
name: Setup Node.js
55+
uses: actions/setup-node@v1
56+
with:
57+
registry-url: https://registry.npmjs.org/
58+
-
59+
name: Publish
60+
run: npm publish
61+
env:
62+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

UnblockNeteaseMusic/.gitignore

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# IDE
2+
.vscode
3+
.idea
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
29+
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (https://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
64+
# next.js build output
65+
.next
66+
67+
# pkg dist directory
68+
dist/
69+
70+
# es6 transformation
71+
src/browser/provider
72+
src/browser/cache.js

UnblockNeteaseMusic/.npmignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.npmignore
2+
.gitignore
3+
.dockerignore
4+
5+
Dockerfile*
6+
*.yml
7+
8+
src/browser/
9+
ca.*
10+
*.worker.js

UnblockNeteaseMusic/Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM alpine
2+
RUN apk add --update nodejs npm --repository=http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/
3+
4+
ENV NODE_ENV production
5+
6+
WORKDIR /usr/src/app
7+
COPY package*.json ./
8+
RUN npm install --production
9+
COPY . .
10+
11+
EXPOSE 8080 8081
12+
13+
ENTRYPOINT ["node", "app.js"]

UnblockNeteaseMusic/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Nzix
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

UnblockNeteaseMusic/README.md

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<img src="https://user-images.githubusercontent.com/26399680/47980314-0e3f1700-e102-11e8-8857-e3436ecc8beb.png" alt="logo" width="140" height="140" align="right">
2+
3+
# UnblockNeteaseMusic
4+
5+
解锁网易云音乐客户端变灰歌曲
6+
7+
## 特性
8+
9+
- 使用 QQ / 虾米 / 百度 / 酷狗 / 酷我 / 咪咕 / JOOX 音源替换变灰歌曲链接 (默认仅启用一、五、六)
10+
- 为请求增加 `X-Real-IP` 参数解锁海外限制,支持指定网易云服务器 IP,支持设置上游 HTTP / HTTPS 代理
11+
- 完整的流量代理功能 (HTTP / HTTPS),可直接作为系统代理 (同时支持 PAC)
12+
13+
## 运行
14+
15+
使用 npx
16+
17+
```
18+
$ npx @nondanee/unblockneteasemusic
19+
```
20+
21+
或使用 Docker
22+
23+
```
24+
$ docker run nondanee/unblockneteasemusic
25+
```
26+
27+
```
28+
$ docker-compose up
29+
```
30+
31+
### 配置参数
32+
33+
```
34+
$ unblockneteasemusic -h
35+
usage: unblockneteasemusic [-v] [-p port] [-a address] [-u url] [-f host]
36+
[-o source [source ...]] [-t token] [-e url] [-s]
37+
[-h]
38+
39+
optional arguments:
40+
-v, --version output the version number
41+
-p port, --port port specify server port
42+
-a address, --address address specify server host
43+
-u url, --proxy-url url request through upstream proxy
44+
-f host, --force-host host force the netease server ip
45+
-o source [source ...], --match-order source [source ...]
46+
set priority of sources
47+
-t token, --token token set up proxy authentication
48+
-e url, --endpoint url replace virtual endpoint with public host
49+
-s, --strict enable proxy limitation
50+
-h, --help output usage information
51+
```
52+
53+
## 使用
54+
55+
**警告:本项目不提供线上 demo,请不要轻易信任使用他人提供的公开代理服务,以免发生安全问题**
56+
57+
**若将服务部署到公网,强烈建议使用严格模式 (此模式下仅放行网易云音乐所属域名的请求) `-s` 限制代理范围 (需使用 PAC 或 hosts),~~或启用 Proxy Authentication `-t <name>:<password>` 设置代理用户名密码~~ (目前密码认证在 Windows 客户端设置和 macOS 系统设置都无法生效,请不要使用),以防代理被他人滥用**
58+
59+
支持 Windows 客户端,UWP 客户端,Android 客户端,Linux 客户端 (1.2 版本以上需要自签证书 MITM,启动客户端需要增加 `--ignore-certificate-errors` 参数),macOS 客户端 (726 版本以上需要自签证书),iOS 客户端 (配置 https endpoint 或使用自签证书) 和网页版 (需要自签证书,需要脚本配合)
60+
61+
目前除 UWP 外其它客户端均优先请求 HTTPS 接口,默认配置下本代理对网易云所有 HTTPS API 连接返回空数据,促使客户端降级使用 HTTP 接口 (新版 Linux 客户端和 macOS 客户端已无法降级)
62+
63+
因 UWP 应用存在网络隔离,限制流量发送到本机,若使用的代理在 localhost,或修改的 hosts 指向 localhost,需为 "网易云音乐 UWP" 手动开启 loopback 才能使用,请以**管理员身份**执行命令
64+
65+
```powershell
66+
checknetisolation loopbackexempt -a -n="1F8B0F94.122165AE053F_j2p0p5q0044a6"
67+
```
68+
69+
### 方法 1. 修改 hosts
70+
71+
向 hosts 文件添加两条规则
72+
73+
```
74+
<Server IP> music.163.com
75+
<Server IP> interface.music.163.com
76+
```
77+
78+
> 使用此方法必须监听 80 端口 `-p 80`
79+
>
80+
> **若在本机运行程序**,请指定网易云服务器 IP `-f xxx.xxx.xxx.xxx` (可在修改 hosts 前通过 `ping music.163.com` 获得) **** 使用代理 `-u http(s)://xxx.xxx.xxx.xxx:xxx`,以防请求死循环
81+
>
82+
> **Android 客户端下修改 hosts 无法直接使用**,原因和解决方法详见[云音乐安卓又搞事啦](https://jixun.moe/post/netease-android-hosts-bypass/)[安卓免 root 绕过网易云音乐 IP 限制](https://jixun.moe/post/android-block-netease-without-root/)
83+
84+
### 方法 2. 设置代理
85+
86+
PAC 自动代理脚本地址 `http://<Server Name:PORT>/proxy.pac`
87+
88+
全局代理地址填写服务器地址和端口号即可
89+
90+
| 平台 | 基础设置 |
91+
| :------ | :------------------------------- |
92+
| Windows | 设置 > 工具 > 自定义代理 (客户端内) |
93+
| UWP | Windows 设置 > 网络和 Internet > 代理 |
94+
| Linux | 系统设置 > 网络 > 网络代理 |
95+
| macOS | 系统偏好设置 > 网络 > 高级 > 代理 |
96+
| Android | WLAN > 修改网络 > 高级选项 > 代理 |
97+
| iOS | 无线局域网 > HTTP 代理 > 配置代理 |
98+
99+
> 代理工具和方法有很多请自行探索,欢迎在 issues 讨论
100+
101+
### ✳方法 3. 调用接口
102+
103+
作为依赖库使用
104+
105+
```
106+
$ npm install @nondanee/unblockneteasemusic
107+
```
108+
109+
```javascript
110+
const match = require('@nondanee/unblockneteasemusic')
111+
112+
/**
113+
* Set proxy or hosts if needed
114+
*/
115+
global.proxy = require('url').parse('http://127.0.0.1:1080')
116+
global.hosts = {'i.y.qq.com': '59.37.96.220'}
117+
118+
/**
119+
* Find matching song from other platforms
120+
* @param {Number} id netease song id
121+
* @param {Array<String>||undefined} source support qq, xiami, baidu, kugou, kuwo, migu, joox
122+
* @return {Promise<Object>}
123+
*/
124+
match(418602084, ['qq', 'kuwo', 'migu']).then(console.log)
125+
```
126+
127+
## 效果
128+
129+
#### Windows 客户端
130+
131+
<img src="https://user-images.githubusercontent.com/26399680/60316017-87de8a80-999b-11e9-9381-16d40efbe7f6.png" width="100%">
132+
133+
#### UWP 客户端
134+
135+
<img src="https://user-images.githubusercontent.com/26399680/52215123-5a028780-28ce-11e9-8491-08c4c5dac3b4.png" width="100%">
136+
137+
#### Linux 客户端
138+
139+
<img src="https://user-images.githubusercontent.com/26399680/60316169-18b56600-999c-11e9-8ae5-5cd168b0edae.png" width="100%">
140+
141+
#### macOS 客户端
142+
143+
<img src="https://user-images.githubusercontent.com/26399680/52196035-51418f80-2895-11e9-8f33-78a631cdf151.png" width="100%">
144+
145+
#### Android 客户端
146+
147+
<img src="https://user-images.githubusercontent.com/26399680/57972549-eabd2900-79ce-11e9-8fef-95cb60906298.png" width="50%">
148+
149+
#### iOS 客户端
150+
151+
<img src="https://user-images.githubusercontent.com/26399680/57972440-f90a4580-79cc-11e9-8dbf-6150ee299b9c.jpg" width="50%">
152+
153+
## 致谢
154+
155+
感谢大佬们为逆向 eapi 所做的努力
156+
157+
使用的其它平台音源 API 出自
158+
159+
[trazyn/ieaseMusic](https://github.com/trazyn/ieaseMusic)
160+
161+
[listen1/listen1_chrome_extension](https://github.com/listen1/listen1_chrome_extension)
162+
163+
向所有同类项目致敬
164+
165+
[EraserKing/CloudMusicGear](https://github.com/EraserKing/CloudMusicGear)
166+
167+
[EraserKing/Unblock163MusicClient](https://github.com/EraserKing/Unblock163MusicClient)
168+
169+
[ITJesse/UnblockNeteaseMusic](https://github.com/ITJesse/UnblockNeteaseMusic/)
170+
171+
[bin456789/Unblock163MusicClient-Xposed](https://github.com/bin456789/Unblock163MusicClient-Xposed)
172+
173+
[YiuChoi/Unlock163Music](https://github.com/YiuChoi/Unlock163Music)
174+
175+
[yi-ji/NeteaseMusicAbroad](https://github.com/yi-ji/NeteaseMusicAbroad)
176+
177+
[stomakun/NeteaseReverseLadder](https://github.com/stomakun/NeteaseReverseLadder/)
178+
179+
[fengjueming/unblock-NetEaseMusic](https://github.com/fengjueming/unblock-NetEaseMusic)
180+
181+
[acgotaku/NetEaseMusicWorld](https://github.com/acgotaku/NetEaseMusicWorld)
182+
183+
[mengskysama/163-Cloud-Music-Unlock](https://github.com/mengskysama/163-Cloud-Music-Unlock)
184+
185+
[azureplus/163-music-unlock](https://github.com/azureplus/163-music-unlock)
186+
187+
[typcn/163music-mac-client-unlock](https://github.com/typcn/163music-mac-client-unlock)
188+
189+
## 许可
190+
191+
The MIT License

0 commit comments

Comments
 (0)