ai生成正则3.json 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. "rules":[
  2. /* 第一层:域名级屏蔽 */
  3. {"name":"🚫AD-Hosts","hosts":[
  4. "ad.","ads.","adserver","guanggao","*.ad.*","tracker.","log.",
  5. "doubleclick.net","adsystem.com","amung.cn","tanx.com","alimama.com"
  6. ],"action":"reject"},
  7. /* 第二层:精准TS特征 */
  8. {"name":"🔍TS-Fingerprint","hosts":["*"],"regex":[
  9. "(#EXT-X-DISCONTINUITY[\\r\\n]+#EXTINF:(?:3|5|10|15)(?:\\.[\\d]+)?,[\\s\\S]*?(?:/ad/|/guanggao/|advert_).*?#EXT-X-DISCONTINUITY)",
  10. "(#UPLYNK-SEGMENT.*?(?:duration=\\d{15}|sponsored=true))"
  11. ]},
  12. /* 第三层:智能时长过滤 */
  13. {"name":"⏱️Duration-Match","hosts":["*"],"regex":[
  14. "(#EXTINF:(0?\\.[1-9]|1\\.[0-9]|[2-9])(?!\\d).*?1o\\.ts)", // 排除正常过渡片段
  15. "(#EXTINF:([12]\\d|30)(\\.\\d+)?,.*?/(preview|trailer)/)" // 长广告标识
  16. ]},
  17. /* 第四层:语义分析 */
  18. {"name":"📖Semantic-Filter","hosts":["*"],"regex":[
  19. "/(ad[sv]|promo|sponsor)/[^/]+\\.ts(\\?|$)", // 路径特征
  20. "(赞助|推荐|赌场|VIP开通|点此下载|澳门)" // 中文关键词
  21. ]},
  22. /* 第五层:AI辅助(需插件) */
  23. {"name":"🤖AI-Validator","hosts":["*"],"script":"
  24. if(ad_probability > 0.9 && !is_whitelist){
  25. return {'action':'block','reason':'AI_Detection'};
  26. }
  27. "}
  28. ]