#!name=Soul
#!desc=某些APP要清除缓存或者重新安装拦截广告才会生效！
#!author=奶思
#!homepage=https://github.com/fmz200/wool_scripts
#!icon=https://raw.githubusercontent.com/fmz200/wool_scripts/main/icons/gif/naisi-01.gif
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Loon/plugin/split/partS/Soul.lpx
#!tg-group=https://t.me/lanjieguanggao
#!date=2025-08-21 22:37:00
#############################################

[Argument]
soul_enable = switch,true,false,tag=Soul-脚本开关

[Rule]
DOMAIN, soul-ad.soulapp.cn, REJECT
DOMAIN, ad-r.soulapp.cn, REJECT
DOMAIN, ad-reward.soulapp.cn, REJECT
DOMAIN-SUFFIX,cdn.soulapp.cn, REJECT
IP-CIDR, 47.56.131.76/32, no-resolve, REJECT
IP-CIDR, 47.97.215.55/32, no-resolve, REJECT
IP-CIDR, 47.99.42.29/32, no-resolve, REJECT
IP-CIDR, 120.27.235.201/32, no-resolve, REJECT
IP-CIDR, 121.196.197.147/32, no-resolve, REJECT


[Rewrite]
# 信息流，帖子详情页等各种广告
^https?:\/\/ssp\.soulapp\.cn\/api\/q reject-dict
^https?:\/\/ssp\.soulapp\.cn\/api\/ad\/config reject-dict
^https?:\/\/chat-live\.soulapp\.cn\/live\/planet\/recListV2 reject-200
^https?:\/\/api-chat\.soulapp\.cn\/chat\/entrance\/first reject-dict
# 国际版Soul去广告
^https?:\/\/api-global\.soulapp\.me\/app\/open\/get reject


[Script]
# 替换信息收集
http-request ^https:\/\/data-collector\.soulapp\.cn\/api\/data\/report\/v\d script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/template/req_replace_body.js, requires-body=true, timeout=60, tag=req_replace_body, enable={soul_enable}
# 青少年模式弹窗
http-response ^https?:\/\/api-account\.soulapp\.cn\/teenager\/config script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/api-a\.soulapp\.cn\/v2\/post\/gift\/list script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/api-a\.soulapp\.cn\/official\/scene\/module script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/api-user\.soulapp\.cn\/furion\/position\/content script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/api-user\.soulapp\.cn\/v\d\/planet\/config script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/api-chat\.soulapp\.cn\/chat\/limitInfo script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/post\.soulapp\.cn\/hot\/soul\/rank script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/post\.soulapp\.cn\/v\d\/post\/homepage\/guide\/card script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/post\.soulapp\.cn\/v\d\/post\/recSquare\/subTabs script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/chat-live\.soulapp\.cn\/chatroom\/chatClassifyRoomList script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/gateway-mobile-gray\.soulapp\.cn\/mobile\/app\/version\/queryIos script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}
http-response ^https?:\/\/47\.110\.187\.87\/winterfell\/v2\/getIpByDomain script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/soul/soul_ads.js, requires-body=true, timeout=60, tag=soul_ads, enable={soul_enable}


[MITM]
hostname = 47.110.187.87, ssp.soulapp.cn, chat-live.soulapp.cn, api-chat.soulapp.cn, api-account.soulapp.cn, api-global.soulapp.me, api-a.soulapp.cn, api-pay.soulapp.cn, gateway-mobile-gray.soulapp.cn, post.soulapp.cn, api-user.soulapp.cn