From 2e9b7b8b225934b498d1952d2fd91d471596e86a Mon Sep 17 00:00:00 2001 From: Conners Hua Date: Sat, 9 Oct 2021 11:57:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Quantumult/Rewrite/Block/YouTubeAds.conf | 4 ++-- Surge/Module/Block/YouTubeAds.sgmodule | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Quantumult/Rewrite/Block/YouTubeAds.conf b/Quantumult/Rewrite/Block/YouTubeAds.conf index 911c1d3..b4b64c4 100644 --- a/Quantumult/Rewrite/Block/YouTubeAds.conf +++ b/Quantumult/Rewrite/Block/YouTubeAds.conf @@ -1,6 +1,6 @@ -hostname = *.googlevideo.com,www.youtube.com,s.youtube.com +hostname = -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com -(^https?:\/\/(?!redirector)[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+)(ctier=[A-Z])(&.+) url 302 $1ctier=A$3 +(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+)&ctier=L(&.+) url 302 $1$2 ^https?:\/\/[\w-]+\.googlevideo\.com\/(?!(dclk_video_ads|videoplayback\?)).+(&oad|ctier) url reject ^https?:\/\/(www|s)\.youtube\.com\/api\/stats\/ads url reject diff --git a/Surge/Module/Block/YouTubeAds.sgmodule b/Surge/Module/Block/YouTubeAds.sgmodule index de13467..aee888d 100644 --- a/Surge/Module/Block/YouTubeAds.sgmodule +++ b/Surge/Module/Block/YouTubeAds.sgmodule @@ -3,11 +3,11 @@ #!system=ios [URL Rewrite] -(^https?:\/\/(?!redirector)[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+)(ctier=[A-Z])(&.+) $1ctier=A$3 header +(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+)&ctier=L(&.+) $1$2 header ^https?:\/\/[\w-]+\.googlevideo\.com\/(?!(dclk_video_ads|videoplayback\?)).+(&oad|ctier) - reject ^https?:\/\/(www|s)\.youtube\.com\/api\/stats\/ads - reject ^https?:\/\/(www|s)\.youtube\.com\/(pagead|ptracking) - reject [MITM] -hostname = %APPEND% *.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 \ No newline at end of file