首先聲明:本文所述方式僅限於學習交流及安全測試,請尊重創作者知識產權,遵守所在地相關法律規定
Github項目UnblockNeteaseMusic
1
| https://github.com/nondanee/UnblockNeteaseMusic
|
這裏主要介紹代理服務器的搭建及配置.
1.安裝node.js
1 2 3 4 5 6 7
| curl -sL https://deb.nodesource.com/setup_10.x | bash - apt install -y nodejs git
curl -sL https://rpm.nodesource.com/setup_10.x | bash - yum install nodejs git -y
|
2.運行UnblockNeteaseMusic
1 2 3
| git clone https://github.com/nondanee/UnblockNeteaseMusic.git cd UnblockNeteaseMusic node app.js
|
這時會啓動代理服務器,默認端口8080,如需更改代理端口,可通過修改config.port
對應數值或運行時指定參數
3.開機自啓
使用systemd
進程守護(僅適用於Centos7+,Ubuntu16+)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 編輯/etc/systemd/system/UnblockNeteaseMusic.service
[Unit] Description=UnblockNeteaseMusic After=network.target Wants=network.target
[Service] Type=simple PIDFile=/var/run/UnblockNeteaseMusic.pid WorkingDirectory=/root/UnblockNeteaseMusic ExecStart=$(command -v node) app.js -p 4567 RestartPreventExitStatus=23 Restart=always
[Install] WantedBy=multi-user.target EOF
|
啓動並設置自啓:
1 2
| systemctl start UnblockNeteaseMusic systemctl enable UnblockNeteaseMusic
|
其它系統設定原理相同(應該也不會有人拿arch做服務器
4.使用方法
1 2 3 4 5 6
|
Windows/Macosx:打開網易暈音樂客戶端 設置>>工具>>自定義代理>>http代理 Linux:由於2.0以上版本客戶端閹割了內置代理設置,可以使用proxychain等命令行工具設置代理 Andorid:設置>>WLAN>>高級設置
|