#!name=Spotify #!desc=更新至测试版,未来本模块稳定后可能不再更新,请考虑使用原版模块 #!arguments=歌词翻译:false, 翻译账户:申请并填入百度翻译AppID, 翻译密钥:申请并填入百度翻译密钥 #!arguments-desc=歌词翻译功能说明\n\n· 需申请百度翻译API的ID和密钥并填入,推荐高级版\n\n· 申请时建议使用桌面设备,移动设备可能访问失败\n\n· 成功启用后,歌词界面左下角即可看到翻译按钮\n\n - 注册百度翻译个人开发者,高级版需要实名认证: \n\n http://api.fanyi.baidu.com/register\n\n - 开通(通用文本翻译)API服务: \n\n https://fanyi-api.baidu.com/choose\n\n - 成功后即可看到自己的AppID和密钥(不要泄露): \n\n http://api.fanyi.baidu.com/manage/developer # 代码来源:https://github.com/app2smile # 仓库地址:https://github.com/LOWERTOP/Shadowrocket-First [Rule] # Spotify QUIC BLOCK AND,((DOMAIN-SUFFIX,spotify.com),(PROTOCOL,QUIC)),REJECT-NO-DROP [Header Rewrite] # if-none-match返回304状态码 http-request ^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/user-customization-service\/v1\/customize$ header-del if-none-match [Script] spotify-json = type=http-request,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/(artistview\/v1\/artist|album-entity-view\/v2\/album)\/,requires-body=0,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-json.js spotify-json2 = type=http-response,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/device-capabilities\/v1\/capabilities,requires-body=1,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-json2.js spotify-proto = type=http-response,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/(bootstrap\/v1\/bootstrap|user-customization-service\/v1\/customize)$,requires-body=1,binary-body-mode=1,max-size=0,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-proto-test.js,script-update-interval=0 spotify歌词翻译 = type=http-response,pattern=^https:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/,requires-body=1,binary-body-mode=1,max-size=0,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-lyric.js,enable={{{歌词翻译}}},argument=appid={{{翻译账户}}}&securityKey={{{翻译密钥}}} [MITM] hostname = %APPEND% spclient.wg.spotify.com, *spclient.spotify.com