Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unblock-netease-music

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unblock-netease-music

A proxy server for Netease Music...

  • 1.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-65.22%
Maintainers
1
Weekly downloads
 
Created
Source

UnblockNeteaseMusic

一个基于 koa 的网易云音乐的代理……

  1. 替换版权曲目播放地址
  2. 禁止客户端更新

English version here.

依赖

  1. Node.js 4.x+

使用方法

  1. npm install unblock-netease-music -g
  2. unblockneteasemusic

测试服务

向 /etc/hosts 文件中添加一行:119.29.65.105 music.163.com

配置参数

unblockneteasemusic -h

  Usage: unblockneteasemusic [options]

  Options:

    -h, --help           output usage information
    -p, --port <port>    Specific server port.
    -f, --force-ip <ip>  Force the netease server ip.
    -k, --kugou          Find copyright music on Kugou.
    -d, --dongting       Find copyright music on TianTianDongTing.
    -q, --qq             Find copyright music on QQ Music.

Windows 用户

在客户端中设置代理为 127.0.0.1:8123,并重启客户端

新客户端 API 有改动,已经用不了了

OSX 用户

  1. 向 /etc/hosts 文件中添加一行:127.0.0.1 music.163.com
  2. 使用 80 端口启动代理服务 sudo unblockneteasemusic -p 80

P.S. 请务必不要更新客户端到 1.2.3 以上的版本。 下载连接: http://pan.baidu.com/s/1kUDqgWB

Android 用户

  1. 自建服务器(见后文)
  2. 向 /etc/hosts 文件中添加一行:<服务器 IP> music.163.com

iOS 用户

  1. 自建服务器(见后文)
  2. 使用 Surge 等代理软件重定向 music.163.com 的流量到自建服务器

使用 nginx 反代

  1. 安装 nginx
  2. 使用下面的配置新建一个 vhost
  3. 启动 nginx.
  4. 向 /etc/hosts 文件中添加一行:127.0.0.1 music.163.com

Nginx 配置

server {
    listen 80;
    server_name music.163.com;

    location / {
        proxy_pass http://127.0.0.1:8123;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Accept-Encoding "";
    }
}

搭建自己的代理服务器

  1. 安装 nginx 和 Node.js
  2. Nginx 配置如下
server {
    listen 80;
    server_name music.163.com;

    location / {
        if ($http_host !~* ^(music.163.com)$){
            return 500;
        }
        proxy_pass http://localhost:8123;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Accept-Encoding "";
    }
}
  1. 安装 sniproxy,配置如下
user daemon
pidfile /var/run/sniproxy.pid

error_log {
    syslog daemon
    priority notice
}

listen <YOUR_SERVER_IP>:443 {
    proto tls
    table https_hosts

    access_log {
        filename /var/log/sniproxy/https_access.log
        priority notice
    }
    fallback 127.0.0.1:443
}

table https_hosts {
    music.163.com 223.252.199.7:443
}
  1. 安装本代理 sudo npm install unblock-netease-music -g
  2. 运行 unblockneteasemusic.
  3. 完成!

预览

感谢

  1. 这个项目最初的想法及实现来源于 EraserKing 的 CloudMusicGear.
  2. 感谢 yanunon 的 API 文档 API documents.
  3. 感谢 Chion82 的配置文件

License

GPLv3

Keywords

FAQs

Package last updated on 08 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc