From 9319b5042ec38d17489063fcaf8afee34f098629 Mon Sep 17 00:00:00 2001 From: Vance Date: Sat, 11 Feb 2023 17:31:50 +0800 Subject: [PATCH 1/2] supported quantumult x --- scripts/lib/writerFormat.class.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/scripts/lib/writerFormat.class.php b/scripts/lib/writerFormat.class.php index e457f089..a4878e9b 100644 --- a/scripts/lib/writerFormat.class.php +++ b/scripts/lib/writerFormat.class.php @@ -204,6 +204,34 @@ class writerFormat{ ), ); + /*Quantumult X 兼容格式的屏蔽广告列表*/ + const QUANX = array( + 'format' => 'host-suffix,{DOMAIN},reject', + 'header' => "#TITLE=anti-AD\n#VER={DATE}\n#URL={URL}\n#TOTAL_LINES={COUNT}\n", + 'full_domain' => 0, + 'name' => 'surge', + 'filename' => '../anti-ad-quanx.txt', + 'whitelist_attached' => array( + 'base-dead-hosts.txt' =>array( + 'merge_mode' => 2, //0=单条,1=单条+子域名,2=根域名相当于1,非根域名相当于0 + ), + ), + 'src' => array( + 'base-src-easylist.txt' => array( + 'type' => 'easylist', + 'strict_mode' => false, + ), + 'base-src-hosts.txt' => array( + 'type' => 'hosts', + 'strict_mode' => false, + ), + 'base-src-strict-hosts.txt' => array( + 'type' => 'hosts', + 'strict_mode' => true, + ), + ), + ); + /*and etc...*/ } From 06ad489070d085e9d9bf5b60b2abf96dc61286dc Mon Sep 17 00:00:00 2001 From: gentlyxu Date: Wed, 29 Mar 2023 19:52:43 +0800 Subject: [PATCH 2/2] fixed quanx name --- scripts/lib/writerFormat.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/writerFormat.class.php b/scripts/lib/writerFormat.class.php index a4878e9b..0b276dac 100644 --- a/scripts/lib/writerFormat.class.php +++ b/scripts/lib/writerFormat.class.php @@ -209,7 +209,7 @@ class writerFormat{ 'format' => 'host-suffix,{DOMAIN},reject', 'header' => "#TITLE=anti-AD\n#VER={DATE}\n#URL={URL}\n#TOTAL_LINES={COUNT}\n", 'full_domain' => 0, - 'name' => 'surge', + 'name' => 'quanx', 'filename' => '../anti-ad-quanx.txt', 'whitelist_attached' => array( 'base-dead-hosts.txt' =>array(