From d9b51d68d3ff389008e32d436071b5737f64860d Mon Sep 17 00:00:00 2001 From: Conners Hua Date: Tue, 1 Mar 2022 16:39:35 +0800 Subject: [PATCH] feat: add AwemeAds.sgmodule & conf --- Quantumult/Outbound.conf | 3 +++ Quantumult/Rewrite/Block/AdvertisingPlus.conf | 7 ------- Quantumult/Rewrite/Block/AwemeAds.conf | 8 ++++++++ Surge/Module/Block/AdvertisingPlus.sgmodule | 8 -------- Surge/Module/Block/AwemeAds.sgmodule | 13 +++++++++++++ 5 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 Quantumult/Rewrite/Block/AwemeAds.conf create mode 100644 Surge/Module/Block/AwemeAds.sgmodule diff --git a/Quantumult/Outbound.conf b/Quantumult/Outbound.conf index 79096b0..1a503e0 100644 --- a/Quantumult/Outbound.conf +++ b/Quantumult/Outbound.conf @@ -259,6 +259,9 @@ https://raw.githubusercontent.com/DivineEngine/Profiles/master/Quantumult/Rewrit # Block YouTube Ads https://raw.githubusercontent.com/DivineEngine/Profiles/master/Quantumult/Rewrite/Block/YouTubeAds.conf, tag=🛡Block YouTube Ads, update-interval=172800, enabled=false +# Block Aweme Ads +https://raw.githubusercontent.com/DivineEngine/Profiles/master/Quantumult/Rewrite/Block/AwemeAds.conf, tag=🛡Block Aweme Ads(<= 16.2.0), update-interval=172800, enabled=false + [server_local] # # 只有 obfs=http, obfs=ws, obfs=ws, obfs=wss 可以有可选的「obfs-uri」字段。 diff --git a/Quantumult/Rewrite/Block/AdvertisingPlus.conf b/Quantumult/Rewrite/Block/AdvertisingPlus.conf index 74bcea8..a88c56a 100644 --- a/Quantumult/Rewrite/Block/AdvertisingPlus.conf +++ b/Quantumult/Rewrite/Block/AdvertisingPlus.conf @@ -1,12 +1,5 @@ hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,www.zhihu.com,api.zhihu.com,appcloud2.zhihu.com,app-api.smzdm.com,homepage-api.smzdm.com,haojia-api.smzdm.com,haojia.m.smzdm.com,baike-api.smzdm.com,s-api.smzdm.com,zhiyou.m.smzdm.com,m,app.bilibili.com -# ---(By Choler)--- -# > Douyin(<= 16.2.0) - api*.amemv.com,aweme.snssdk.com -https?:\/\/(.+?)\.amemv\.com\/aweme\/v2\/feed\/ url request-header GET \/aweme\/v\d\/(.+\r\n) request-header GET /aweme/v1/$1 - -https?:\/\/(.+?)\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body https://raw.githubusercontent.com/Choler/Surge/master/Script/douyin.js -# ------ - # ---(By yichahucha)--- # > Weibo - api.weibo.cn,mapi.weibo.com ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js diff --git a/Quantumult/Rewrite/Block/AwemeAds.conf b/Quantumult/Rewrite/Block/AwemeAds.conf new file mode 100644 index 0000000..5bfd9e2 --- /dev/null +++ b/Quantumult/Rewrite/Block/AwemeAds.conf @@ -0,0 +1,8 @@ +hostname = *.amemv.com, *.snssdk.com + +# ---(By Choler)--- +# > Aweme(<= 16.2.0) - api*.amemv.com,aweme.snssdk.com +https?:\/\/(.+?)\.amemv\.com\/aweme\/v2\/feed\/ url request-header GET \/aweme\/v\d\/(.+\r\n) request-header GET /aweme/v1/$1 + +https?:\/\/(.+?)\.amemv\.com\/aweme\/v\d\/feed\/ url script-response-body https://raw.githubusercontent.com/Choler/Surge/master/Script/douyin.js +# ------ \ No newline at end of file diff --git a/Surge/Module/Block/AdvertisingPlus.sgmodule b/Surge/Module/Block/AdvertisingPlus.sgmodule index 0abbc7d..bb4a555 100644 --- a/Surge/Module/Block/AdvertisingPlus.sgmodule +++ b/Surge/Module/Block/AdvertisingPlus.sgmodule @@ -1,20 +1,12 @@ #!name=Block Advertising Plus #!desc=Block Advertising with Script -[URL Rewrite] -# > Douyin(<= 16.2.0) By Choler -^https?:\/\/api.*\.amemv\.com\/aweme\/v2\/feed\/ https://aweme.snssdk.com/aweme/v1/feed/ header - [Map Local] # ---(By blackmatrix7)--- # 知乎其他广告拦截 ^https?:\/\/api\.zhihu\.com\/(notifications\/v\d\/count|v\d\/package|me\/guides|drama\/living-info|ad|fringe|commercial|market\/popovers|.*featured-comment-ad) data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json" [Script] -# ---(By Choler)--- -# > Douyin(<= 16.2.0) - api*.amemv.com, *.snssdk.com -douyin = type=http-response,pattern=^https?:\/\/aweme\.snssdk\.com\/aweme\/v\d\/feed\/,requires-body=1,script-path=https://raw.githubusercontent.com/Choler/Surge/master/Script/douyin.js -# ------ # ---(By yichahucha)--- # > Weibo - api.weibo.cn,mapi.weibo.com,*.uve.weibo.com diff --git a/Surge/Module/Block/AwemeAds.sgmodule b/Surge/Module/Block/AwemeAds.sgmodule new file mode 100644 index 0000000..e587bee --- /dev/null +++ b/Surge/Module/Block/AwemeAds.sgmodule @@ -0,0 +1,13 @@ +#!name=Block Aweme Advertising +#!desc=By Choler | 抖音版本 <= 16.2.0 + +[URL Rewrite] +^https?:\/\/api.*\.amemv\.com\/aweme\/v2\/feed\/ https://aweme.snssdk.com/aweme/v1/feed/ header + +[Script] +# > Aweme - *.amemv.com, *.snssdk.com +douyin = type=http-response,pattern=^https?:\/\/aweme\.snssdk\.com\/aweme\/v\d\/feed\/,requires-body=1,script-path=https://raw.githubusercontent.com/Choler/Surge/master/Script/douyin.js +# ------ + +[MITM] +hostname = %APPEND% *.amemv.com, *.snssdk.com \ No newline at end of file