Skip to content

Commit

Permalink
Merge pull request #78 from 1715173329/refactor/cleanup
Browse files Browse the repository at this point in the history
cleanup and update the code
  • Loading branch information
pan93412 authored Jun 8, 2021
2 parents dc12970 + f5dbab9 commit c5ee4ec
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 402 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/publish.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .npmignore

This file was deleted.

52 changes: 25 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,35 @@

解锁网易云音乐客户端变灰歌曲

fork 自 [nondanee 的原版](https://github.com/nondanee/UnblockNeteaseMusic),仅作部分优化。十分感谢 nondanee 提供如此棒的工具!

## 特性

- 使用 QQ / 虾米 / 百度 / 酷狗 / 酷我 / 咪咕 / JOOX 音源替换变灰歌曲链接 (默认仅启用一、五、六)
- 使用 bb音乐 / QQ / 虾米 / 百度 / 酷狗 / 酷我 / 咪咕 / JOOX 音源替换变灰歌曲链接 (默认仅启用一、五、六)
- 为请求增加 `X-Real-IP` 参数解锁海外限制,支持指定网易云服务器 IP,支持设置上游 HTTP / HTTPS 代理
- 完整的流量代理功能 (HTTP / HTTPS),可直接作为系统代理 (同时支持 PAC)

## 运行

使用 npx
### docker 作法

```bash
git clone https://github.com/1715173329/UnblockNeteaseMusic
cd UnblockNeteaseMusic
docker-compose up
```
$ npx @nondanee/unblockneteasemusic
```

或使用 Docker

```
$ docker run nondanee/unblockneteasemusic
```
### 传统作法

```
$ docker-compose up
```bash
git clone https://github.com/1715173329/UnblockNeteaseMusic
cd UnblockNeteaseMusic
node app.js # 建议使用 screen / tmux 把 app.js 挂后台
```

### 配置参数

```
```bash
$ unblockneteasemusic -h
usage: unblockneteasemusic [-v] [-p port] [-a address] [-u url] [-f host]
[-o source [source ...]] [-t token] [-e url] [-s]
Expand All @@ -52,7 +54,7 @@ optional arguments:
## 使用
**警告:本项目不提供线上 demo,请不要轻易信任使用他人提供的公开代理服务,以免发生安全问题**
**警告**:本项目不提供线上 demo,请不要轻易信任使用他人提供的公开代理服务,以免发生安全问题
**若将服务部署到公网,强烈建议使用严格模式 (此模式下仅放行网易云音乐所属域名的请求) `-s` 限制代理范围 (需使用 PAC 或 hosts),~~或启用 Proxy Authentication `-t <name>:<password>` 设置代理用户名密码~~ (目前密码认证在 Windows 客户端设置和 macOS 系统设置都无法生效,请不要使用),以防代理被他人滥用**
Expand All @@ -70,12 +72,12 @@ checknetisolation loopbackexempt -a -n="1F8B0F94.122165AE053F_j2p0p5q0044a6"
向 hosts 文件添加两条规则
```
```hosts
<Server IP> music.163.com
<Server IP> interface.music.163.com
```
> 使用此方法必须监听 80 端口 `-p 80`
> 使用此方法必须监听 80 端口 `-p 80`
>
> **若在本机运行程序**,请指定网易云服务器 IP `-f xxx.xxx.xxx.xxx` (可在修改 hosts 前通过 `ping music.163.com` 获得) **** 使用代理 `-u http(s)://xxx.xxx.xxx.xxx:xxx`,以防请求死循环
>
Expand All @@ -102,12 +104,8 @@ PAC 自动代理脚本地址 `http://<Server Name:PORT>/proxy.pac`
作为依赖库使用
```
$ npm install @nondanee/unblockneteasemusic
```

```javascript
const match = require('@nondanee/unblockneteasemusic')
const match = require('@1715173329/unblockneteasemusic')

/**
* Set proxy or hosts if needed
Expand All @@ -126,27 +124,27 @@ match(418602084, ['qq', 'kuwo', 'migu']).then(console.log)
## 效果
#### Windows 客户端
### Windows 客户端
<img src="https://user-images.githubusercontent.com/26399680/60316017-87de8a80-999b-11e9-9381-16d40efbe7f6.png" width="100%">
#### UWP 客户端
### UWP 客户端
<img src="https://user-images.githubusercontent.com/26399680/52215123-5a028780-28ce-11e9-8491-08c4c5dac3b4.png" width="100%">
#### Linux 客户端
### Linux 客户端
<img src="https://user-images.githubusercontent.com/26399680/60316169-18b56600-999c-11e9-8ae5-5cd168b0edae.png" width="100%">
#### macOS 客户端
### macOS 客户端
<img src="https://user-images.githubusercontent.com/26399680/52196035-51418f80-2895-11e9-8f33-78a631cdf151.png" width="100%">
#### Android 客户端
### Android 客户端
<img src="https://user-images.githubusercontent.com/26399680/57972549-eabd2900-79ce-11e9-8fef-95cb60906298.png" width="50%">
#### iOS 客户端
### iOS 客户端
<img src="https://user-images.githubusercontent.com/26399680/57972440-f90a4580-79cc-11e9-8dbf-6150ee299b9c.jpg" width="50%">
Expand Down Expand Up @@ -188,4 +186,4 @@ match(418602084, ['qq', 'kuwo', 'migu']).then(console.log)
## 许可
The MIT License
The MIT License
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
unblockneteasemusic:
image: nondanee/unblockneteasemusic
build: .
environment:
NODE_ENV: production
ports:
Expand Down
20 changes: 0 additions & 20 deletions endpoint.worker.js

This file was deleted.

26 changes: 6 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
{
"name": "@nondanee/unblockneteasemusic",
"version": "0.25.3",
"name": "@1715173329/unblockneteasemusic",
"version": "0.26.0",
"description": "Revive unavailable songs for Netease Cloud Music",
"main": "src/provider/match.js",
"bin": {
"unblockneteasemusic": "app.js"
},
"scripts": {
"pkg": "pkg . --out-path=dist/"
},
"pkg": {
"assets": [
"server.key",
"server.crt"
]
},
"main": "app.js",
"repository": {
"type": "git",
"url": "https://github.com/nondanee/UnblockNeteaseMusic.git"
"url": "https://github.com/1715173329/UnblockNeteaseMusic.git"
},
"author": "nondanee",
"author": "nondanee, 1715173329, pan93412",
"license": "MIT",
"dependencies": {},
"publishConfig": {
"access": "public"
}
"private": true
}
31 changes: 0 additions & 31 deletions src/browser/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/browser/background.html

This file was deleted.

34 changes: 0 additions & 34 deletions src/browser/background.js

This file was deleted.

43 changes: 0 additions & 43 deletions src/browser/convert.js

This file was deleted.

Loading

0 comments on commit c5ee4ec

Please sign in to comment.