From e2f5702f9cc2a122d50d18cf544ad1b0e3cce072 Mon Sep 17 00:00:00 2001 From: Conners Hua Date: Tue, 25 Jan 2022 11:49:38 +0800 Subject: [PATCH] feat: update url reject --- Quantumult/Rewrite/Block/Advertising.conf | 2 +- Quantumult/Rewrite/Block/YouTubeAds.conf | 5 +++-- Surge/Module/Block/Advertising.sgmodule | 2 +- Surge/Module/Block/YouTubeAds.sgmodule | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Quantumult/Rewrite/Block/Advertising.conf b/Quantumult/Rewrite/Block/Advertising.conf index fedc1c9..d9847b1 100644 --- a/Quantumult/Rewrite/Block/Advertising.conf +++ b/Quantumult/Rewrite/Block/Advertising.conf @@ -32,7 +32,7 @@ hostname = -lark-frontier-hl.snssdk.com,api.21jingji.com,service.4gtv.tv,app.58. # > Taopiaopiao - acs.m.taobao.com ^https?:\/\/acs\.m\.taobao\.com\/gw\/mtop\.film\.mtopadvertiseapi\.queryadvertise\/ url reject # > AMap - m*.amap.com -^https?:\/\/m\d\.amap\.com\/ws\/valueadded\/alimama\/splash_screen\/ url reject +^https?:\/\/m\d\.amap\.com\/ws\/valueadded\/alimama\/splash_screen url reject # > YOUKU ^https?:\/\/.+?\.ott\.cibntv\.net\/[\w\/-]+.mp4\?sid= url reject # > Kaola - gw.kaola.com diff --git a/Quantumult/Rewrite/Block/YouTubeAds.conf b/Quantumult/Rewrite/Block/YouTubeAds.conf index 9e6688d..e500df6 100644 --- a/Quantumult/Rewrite/Block/YouTubeAds.conf +++ b/Quantumult/Rewrite/Block/YouTubeAds.conf @@ -1,8 +1,9 @@ -hostname = -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com +hostname = -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com,youtubei.googleapis.com -(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+)&ctier=L(&.+) url 302 $1&ctier=A$2 +(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) url 302 $1$2$3 ^https?:\/\/[\w-]+\.googlevideo\.com\/(?!(dclk_video_ads|videoplayback\?)).+&oad url reject +^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v\d\/player\/ad_break url reject ^https?:\/\/(www|s)\.youtube\.com\/api\/stats\/ads url reject ^https?:\/\/(www|s)\.youtube\.com\/(pagead|ptracking) url reject ^https?:\/\/s\.youtube\.com\/api\/stats\/qoe\?adcontext url reject \ No newline at end of file diff --git a/Surge/Module/Block/Advertising.sgmodule b/Surge/Module/Block/Advertising.sgmodule index 60e3922..3b7d606 100644 --- a/Surge/Module/Block/Advertising.sgmodule +++ b/Surge/Module/Block/Advertising.sgmodule @@ -32,7 +32,7 @@ URL-REGEX,^https?:\/\/api\.m\.jd.com\/client\.action\?functionId=start,REJECT-TI # > Taopiaopiao - acs.m.taobao.com ^https?:\/\/acs\.m\.taobao\.com\/gw\/mtop\.film\.mtopadvertiseapi\.queryadvertise\/ - reject # > AMap - m*.amap.com -^https?:\/\/m\d\.amap\.com\/ws\/valueadded\/alimama\/splash_screen\/ - reject +^https?:\/\/m\d\.amap\.com\/ws\/valueadded\/alimama\/splash_screen - reject # > YOUKU ^https?:\/\/.+?\.ott\.cibntv\.net\/[\w\/-]+.mp4\?sid= - reject # > Kaola - gw.kaola.com diff --git a/Surge/Module/Block/YouTubeAds.sgmodule b/Surge/Module/Block/YouTubeAds.sgmodule index f9a6814..ab20284 100644 --- a/Surge/Module/Block/YouTubeAds.sgmodule +++ b/Surge/Module/Block/YouTubeAds.sgmodule @@ -2,12 +2,13 @@ #!desc=仅用于视频广告,不适用允许 UDP 转发的节点及 Premium [URL Rewrite] -(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+)&ctier=L(&.+) $1&ctier=A$2 header +(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) $1$2$3 header ^https?:\/\/[\w-]+\.googlevideo\.com\/(?!(dclk_video_ads|videoplayback\?)).+&oad - reject +^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v\d\/player\/ad_break ^https?:\/\/(www|s)\.youtube\.com\/api\/stats\/ads - reject ^https?:\/\/(www|s)\.youtube\.com\/(pagead|ptracking) - reject ^https?:\/\/s\.youtube\.com\/api\/stats\/qoe\?adcontext - reject [MITM] -hostname = %APPEND% -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com \ No newline at end of file +hostname = %APPEND% -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com,youtubei.googleapis.com \ No newline at end of file