From 04c4323ddb00bd2f7d087e8ef79a5972a21cb252 Mon Sep 17 00:00:00 2001 From: zhao Date: Sat, 22 Feb 2025 17:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20OpenWrt/preset-clash-core.?= =?UTF-8?q?sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- OpenWrt/preset-clash-core.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 OpenWrt/preset-clash-core.sh diff --git a/OpenWrt/preset-clash-core.sh b/OpenWrt/preset-clash-core.sh new file mode 100644 index 0000000..b52cef5 --- /dev/null +++ b/OpenWrt/preset-clash-core.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +mkdir -p files/etc/openclash/core + +CLASH_META_URL="https://raw.githubusercontent.com/vernesong/OpenClash/core/master/meta/clash-linux-${1}.tar.gz" +GEOIP_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" +GEOSITE_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" + +wget -qO- $CLASH_META_URL | tar xOvz > files/etc/openclash/core/clash_meta +wget -qO- $GEOIP_URL > files/etc/openclash/GeoIP.dat +wget -qO- $GEOSITE_URL > files/etc/openclash/GeoSite.dat + +chmod +x files/etc/openclash/core/clash* \ No newline at end of file