部署UnblockNeteaseMusic

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

部署UnblockNeteaseMusic

yum -y install nodejs git
cd /usr/local/webserver/
git clone https://github.com/nondanee/UnblockNeteaseMusic.git

创建服务脚本

cat > /etc/systemd/system/UnblockNeteaseMusic.service <<EOF
[Unit]
Description=UnblockNeteaseMusic
After=network.target
Wants=network.target

[Service]
Type=simple
PIDFile=/var/run/UnblockNeteaseMusic.pid
WorkingDirectory=/usr/local/webserver/UnblockNeteaseMusic
ExecStart=/usr/bin/node app.js -p 163:164
Restart=always
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target 
EOF

如客户端为IOS需单独配置

[Unit]
Description=UnblockNeteaseMusicIos
After=network.target
Wants=network.target

[Service]
Type=simple
PIDFile=/var/run/UnblockNeteaseMusicIos.pid
WorkingDirectory=/usr/local/webserver/UnblockNeteaseMusic
ExecStart=/usr/bin/node app.js -s -e https://music.163.com -p 1163:1164
Restart=always
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

加入启动项

systemctl enable UnblockNeteaseMusic.service

启动UnblockNeteaseMusic服务

systemctl start UnblockNeteaseMusic.service

开启防火墙端口

/sbin/iptables -I INPUT -p tcp --dport 163 -j ACCEPT
/usr/libexec/iptables/iptables.init save
systemctl restart iptables.service

在网易云音乐客户端代理访问 服务器IP 与 163端口 即可