From 66e204e5ba65667beb12c772fe75eef86d53a08a Mon Sep 17 00:00:00 2001 From: mercury Date: Wed, 27 Nov 2024 23:37:39 +0400 Subject: [PATCH] import url for clash --- app/bot.php | 8 ++++++++ config/clash.json | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/bot.php b/app/bot.php index 6e9c141..98b9ae6 100644 --- a/app/bot.php +++ b/app/bot.php @@ -5777,6 +5777,8 @@ DNS-over-HTTPS with IP: $text[] = "import://streisand"; $text[] = "import://hiddify"; $text[] = "import://karing"; + $text[] = "import://clash"; + $text[] = "import://clashmeta"; $si = "$scheme://{$domain}/pac/" . base64_encode(serialize([ 'h' => $hash, @@ -5951,6 +5953,12 @@ DNS-over-HTTPS with IP: case 'h': header("Location: hiddify://install-config/?url=$si"); exit; + case 'c': + header("Location: clash://install-config/?url=$cl"); + exit; + case 'cm': + header("Location: clashmeta://install-config/?url=$cl"); + exit; case 'w': $link = htmlspecialchars($si, ENT_XML1, 'UTF-8'); $n = "singbox_$uid.zip"; diff --git a/config/clash.json b/config/clash.json index 9425f45..63cce15 100644 --- a/config/clash.json +++ b/config/clash.json @@ -109,7 +109,12 @@ { "type": "PROCESS-NAME", "list": "~process~", - "action": "REJECT" + "action": "PROXY" + }, + { + "type": "PROCESS-NAME", + "list": "~package~", + "action": "PROXY" }, { "type": "MATCH",