Update On Sun Oct 26 19:36:04 CET 2025

This commit is contained in:
github-action[bot]
2025-10-26 19:36:04 +01:00
parent d01a190a31
commit 527412c703
139 changed files with 21102 additions and 8534 deletions
+1
View File
@@ -1162,3 +1162,4 @@ Update On Wed Oct 22 20:43:37 CEST 2025
Update On Thu Oct 23 20:39:01 CEST 2025
Update On Fri Oct 24 20:39:40 CEST 2025
Update On Sat Oct 25 20:37:45 CEST 2025
Update On Sun Oct 26 19:35:56 CET 2025
+3 -3
View File
@@ -4,9 +4,9 @@ RUN echo "I'm building for $TARGETPLATFORM"
RUN apk add --no-cache gzip && \
mkdir /mihomo-config && \
wget -O /mihomo-config/geoip.metadb https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb && \
wget -O /mihomo-config/geosite.dat https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat && \
wget -O /mihomo-config/geoip.dat https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat
wget -O /mihomo-config/geoip.metadb https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb && \
wget -O /mihomo-config/geosite.dat https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat && \
wget -O /mihomo-config/geoip.dat https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat
COPY docker/file-name.sh /mihomo/file-name.sh
WORKDIR /mihomo
@@ -194,7 +194,7 @@ func strategyStickySessions(url string) strategyFn {
key := utils.MapHash(getKeyWithSrcAndDst(metadata))
length := len(proxies)
idx, has := lruCache.Get(key)
if !has {
if !has || idx >= length {
idx = int(jumpHash(key+uint64(time.Now().UnixNano()), int32(length)))
}
@@ -85,6 +85,7 @@ func newCubicSender(
initialMaxCongestionWindow: initialMaxCongestionWindow,
congestionWindow: initialCongestionWindow,
slowStartThreshold: MaxByteCount,
cubic: NewCubic(),
reno: reno,
maxDatagramSize: initialMaxDatagramSize,
}
+17 -14
View File
@@ -346,7 +346,7 @@ dependencies = [
"objc2-foundation 0.3.2",
"parking_lot",
"percent-encoding",
"windows-sys 0.60.2",
"windows-sys 0.52.0",
"wl-clipboard-rs",
"x11rb",
]
@@ -1459,9 +1459,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.49"
version = "4.5.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4512b90fa68d3a9932cea5184017c5d200f5921df706d45e853537dea51508f"
checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1469,9 +1469,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.49"
version = "4.5.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0025e98baa12e766c67ba13ff4695a887a1eba19569aad00a472546795bd6730"
checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0"
dependencies = [
"anstream",
"anstyle",
@@ -2294,7 +2294,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.2",
"windows-sys 0.60.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -2803,7 +2803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
dependencies = [
"libc",
"windows-sys 0.60.2",
"windows-sys 0.52.0",
]
[[package]]
@@ -2972,9 +2972,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
[[package]]
name = "flate2"
version = "1.1.4"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9"
checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb"
dependencies = [
"crc32fast",
"libz-rs-sys",
@@ -4450,9 +4450,12 @@ dependencies = [
[[package]]
name = "indoc"
version = "2.0.6"
version = "2.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
dependencies = [
"rustversion",
]
[[package]]
name = "infer"
@@ -4919,7 +4922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
"windows-targets 0.53.3",
"windows-targets 0.48.5",
]
[[package]]
@@ -7323,7 +7326,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
"windows-sys 0.60.2",
"windows-sys 0.52.0",
]
[[package]]
@@ -7890,7 +7893,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.9.4",
"windows-sys 0.60.2",
"windows-sys 0.52.0",
]
[[package]]
@@ -474,7 +474,10 @@ pub async fn resolve_core_version(app_handle: &AppHandle, core_type: &ClashCore)
|| item.starts_with("alpha")
|| Version::parse(item).is_ok()
{
return Ok(item.to_string());
match core_type {
ClashCore::ClashRs => return Ok(format!("v{}", item)),
_ => return Ok(item.to_string()),
}
}
}
Err(anyhow::anyhow!("failed to get core version"))
@@ -87,7 +87,7 @@
"shiki": "2.5.0",
"unplugin-auto-import": "20.2.0",
"unplugin-icons": "22.4.2",
"validator": "13.15.15",
"validator": "13.15.20",
"vite": "7.1.10",
"vite-plugin-html": "3.2.2",
"vite-plugin-sass-dts": "1.3.34",
+2 -2
View File
@@ -5,7 +5,7 @@
"mihomo_alpha": "alpha-90f47a6",
"clash_rs": "v0.9.1",
"clash_premium": "2023-09-05-gdcc8d87",
"clash_rs_alpha": "0.9.1-alpha+sha.90b204c"
"clash_rs_alpha": "0.9.1-alpha+sha.fc9ebc5"
},
"arch_template": {
"mihomo": {
@@ -69,5 +69,5 @@
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
}
},
"updated_at": "2025-10-24T22:21:14.736Z"
"updated_at": "2025-10-25T22:20:57.739Z"
}
+5 -5
View File
@@ -439,8 +439,8 @@ importers:
specifier: 22.4.2
version: 22.4.2(@svgr/core@8.1.0(typescript@5.9.3))
validator:
specifier: 13.15.15
version: 13.15.15
specifier: 13.15.20
version: 13.15.20
vite:
specifier: 7.1.10
version: 7.1.10(@types/node@24.8.1)(jiti@2.6.0)(less@4.2.0)(lightningcss@1.30.1)(sass-embedded@1.93.2)(sass@1.93.2)(stylus@0.62.0)(terser@5.36.0)(tsx@4.20.6)(yaml@2.8.1)
@@ -8417,8 +8417,8 @@ packages:
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
validator@13.15.15:
resolution: {integrity: sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A==}
validator@13.15.20:
resolution: {integrity: sha512-KxPOq3V2LmfQPP4eqf3Mq/zrT0Dqp2Vmx2Bn285LwVahLc+CsxOM0crBHczm8ijlcjZ0Q5Xd6LW3z3odTPnlrw==}
engines: {node: '>= 0.10'}
varint@6.0.0:
@@ -17530,7 +17530,7 @@ snapshots:
util-deprecate@1.0.2: {}
validator@13.15.15: {}
validator@13.15.20: {}
varint@6.0.0: {}
+28 -18
View File
@@ -5,16 +5,16 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-10-28
PKG_SOURCE_VERSION:=a1ad8568a1378d71c1f6354c428ebb1baa46fa05
PKG_MIRROR_HASH:=68747e1253776dc00286c01e408f4c4e1eb61acf56009b7ecb3de4d49b34e567
PKG_SOURCE_DATE:=2025-06-06
PKG_SOURCE_VERSION:=9331888de6bd5b280d75112e5b2f7b55684db0ec
PKG_MIRROR_HASH:=7ebbea3624fb413364f37ac5b0655bb73ea02a054b63cf72b035683cf701ba1f
PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_INSTALL:=1
PKG_INSTALL:=2
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
HOST_BUILD_DEPENDS:=lua/host
@@ -27,7 +27,7 @@ define Package/apk/default
SECTION:=base
CATEGORY:=Base system
TITLE:=apk package manager
DEPENDS:=+zlib
DEPENDS:=+zlib +wget
URL:=$(PKG_SOURCE_URL)
PROVIDES:=apk
endef
@@ -51,22 +51,32 @@ endef
MESON_HOST_VARS+=VERSION=$(PKG_VERSION)
MESON_VARS+=VERSION=$(PKG_VERSION)
MESON_HOST_ARGS += \
MESON_COMMON_ARGS = \
-Db_lto=true \
-Dcompressed-help=false \
-Ddocs=disabled \
-Dcrypto_backend=openssl \
-Dzstd=false
-Dhelp=enabled \
-Dlua_version=5.1 \
-Ddefault_library=static \
-Durl_backend=wget \
-Dzstd=false \
-Dpython=disabled \
-Dtests=disabled
MESON_HOST_ARGS += \
$(MESON_COMMON_ARGS) \
-Dcrypto_backend=openssl
MESON_ARGS += \
-Dlua_version=5.1 \
-Dcompressed-help=false \
-Ddocs=disabled \
-Durl_backend=wget \
-Dcrypto_backend=$(BUILD_VARIANT) \
-Dzstd=false
$(MESON_COMMON_ARGS) \
-Dcrypto_backend=$(BUILD_VARIANT)
HOST_LDFLAGS += \
-Wl,-rpath $(STAGING_DIR_HOST)/lib
define Package/apk/conffiles
/etc/apk/repositories.d/customfeeds.list
endef
Package/apk-mbedtls/conffiles = $(Package/apk/conffiles)
Package/apk-openssl/conffiles = $(Package/apk/conffiles)
define Package/apk/default/install
$(INSTALL_DIR) $(1)/lib/apk/db
@@ -74,8 +84,8 @@ define Package/apk/default/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apk $(1)/usr/bin/apk
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapk.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/apk/repositories.d
$(INSTALL_DATA) ./files/customfeeds.list $(1)/etc/apk/repositories.d/customfeeds.list
endef
Package/apk-mbedtls/install = $(Package/apk/default/install)
@@ -0,0 +1,3 @@
# add your custom package feeds here
#
# http://www.example.com/path/to/files/packages.adb
@@ -10,7 +10,7 @@ Signed-off-by: Paul Spooren <mail@aparcar.org>
--- a/src/database.c
+++ b/src/database.c
@@ -1626,7 +1626,7 @@ const char *apk_db_layer_name(int layer)
@@ -1856,7 +1856,7 @@ const char *apk_db_layer_name(int layer)
{
switch (layer) {
case APK_DB_LAYER_ROOT: return "lib/apk/db";
+3 -3
View File
@@ -4,9 +4,9 @@ RUN echo "I'm building for $TARGETPLATFORM"
RUN apk add --no-cache gzip && \
mkdir /mihomo-config && \
wget -O /mihomo-config/geoip.metadb https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb && \
wget -O /mihomo-config/geosite.dat https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat && \
wget -O /mihomo-config/geoip.dat https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat
wget -O /mihomo-config/geoip.metadb https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb && \
wget -O /mihomo-config/geosite.dat https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat && \
wget -O /mihomo-config/geoip.dat https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat
COPY docker/file-name.sh /mihomo/file-name.sh
WORKDIR /mihomo
+1 -1
View File
@@ -194,7 +194,7 @@ func strategyStickySessions(url string) strategyFn {
key := utils.MapHash(getKeyWithSrcAndDst(metadata))
length := len(proxies)
idx, has := lruCache.Get(key)
if !has {
if !has || idx >= length {
idx = int(jumpHash(key+uint64(time.Now().UnixNano()), int32(length)))
}
@@ -85,6 +85,7 @@ func newCubicSender(
initialMaxCongestionWindow: initialMaxCongestionWindow,
congestionWindow: initialCongestionWindow,
slowStartThreshold: MaxByteCount,
cubic: NewCubic(),
reno: reno,
maxDatagramSize: initialMaxDatagramSize,
}
@@ -22,7 +22,9 @@
<uses-permission
android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
tools:ignore="PackageVisibilityPolicy" />
<uses-permission android:name="com.android.permission.GET_INSTALLED_APPS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
@@ -2,7 +2,6 @@ package io.nekohasekai.sagernet.ui
import android.content.Intent
import android.content.pm.ApplicationInfo
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.graphics.drawable.Drawable
import android.os.Bundle
@@ -45,6 +44,11 @@ import kotlin.coroutines.coroutineContext
class AppListActivity : ThemedActivity() {
companion object {
private const val SWITCH = "switch"
private val cachedApps
get() = PackageCache.installedPackages.toMutableMap().apply {
remove(BuildConfig.APPLICATION_ID)
}
}
private class ProxiedApp(
@@ -96,7 +100,8 @@ class AppListActivity : ThemedActivity() {
var filteredApps = apps
suspend fun reload() {
apps = getCachedApps().mapNotNull { (packageName, packageInfo) ->
PackageCache.reload()
apps = cachedApps.mapNotNull { (packageName, packageInfo) ->
coroutineContext[Job]!!.ensureActive()
packageInfo.applicationInfo?.let { ProxiedApp(packageManager, it, packageName) }
}.sortedWith(compareBy({ !isProxiedApp(it) }, { it.name.toString() }))
@@ -156,7 +161,7 @@ class AppListActivity : ThemedActivity() {
private fun initProxiedUids(str: String = DataStore.routePackages) {
proxiedUids.clear()
val apps = getCachedApps()
val apps = cachedApps
for (line in str.lineSequence()) {
val app = (apps[line] ?: continue)
val uid = app.applicationInfo?.uid ?: continue
@@ -174,14 +179,12 @@ class AppListActivity : ThemedActivity() {
val adapter = binding.list.adapter as AppsAdapter
withContext(Dispatchers.IO) { adapter.reload() }
adapter.filter.filter(binding.search.text?.toString() ?: "")
binding.list.crossFadeFrom(loading)
}
}
fun getCachedApps(): MutableMap<String, PackageInfo> {
val packages = PackageCache.installedPackages
return packages.toMutableMap().apply {
remove(BuildConfig.APPLICATION_ID)
if (apps.isEmpty()) {
binding.list.visibility = View.GONE
binding.appPlaceholder.root.crossFadeFrom(loading)
} else {
binding.list.crossFadeFrom(loading)
}
}
}
@@ -191,6 +194,14 @@ class AppListActivity : ThemedActivity() {
binding = LayoutAppListBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.appPlaceholder.openSettings.setOnClickListener {
val intent =
Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
data = android.net.Uri.fromParts("package", packageName, null)
}
startActivity(intent)
}
setSupportActionBar(binding.toolbar)
supportActionBar?.apply {
setTitle(R.string.select_apps)
@@ -106,6 +106,7 @@ class AppManagerActivity : ThemedActivity() {
var filteredApps = apps
suspend fun reload() {
PackageCache.reload()
apps = cachedApps.mapNotNull { (packageName, packageInfo) ->
coroutineContext[Job]!!.ensureActive()
packageInfo.applicationInfo?.let { ProxiedApp(packageManager, it, packageName) }
@@ -184,7 +185,12 @@ class AppManagerActivity : ThemedActivity() {
val adapter = binding.list.adapter as AppsAdapter
withContext(Dispatchers.IO) { adapter.reload() }
adapter.filter.filter(binding.search.text?.toString() ?: "")
binding.list.crossFadeFrom(loading)
if (apps.isEmpty()) {
binding.list.visibility = View.GONE
binding.appPlaceholder.root.crossFadeFrom(loading)
} else {
binding.list.crossFadeFrom(loading)
}
}
}
@@ -194,6 +200,14 @@ class AppManagerActivity : ThemedActivity() {
binding = LayoutAppsBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.appPlaceholder.openSettings.setOnClickListener {
val intent =
Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
data = android.net.Uri.fromParts("package", packageName, null)
}
startActivity(intent)
}
setSupportActionBar(binding.toolbar)
supportActionBar?.apply {
setTitle(R.string.proxied_apps)
@@ -67,15 +67,6 @@ object PackageCache {
operator fun get(uid: Int) = uidMap[uid]
operator fun get(packageName: String) = packageMap[packageName]
suspend fun awaitLoad() {
if (::packageMap.isInitialized) {
return
}
loaded.withLock {
// just await
}
}
fun awaitLoadSync() {
if (::packageMap.isInitialized) {
return
@@ -116,4 +116,8 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:listitem="@layout/layout_apps_item" />
<include
android:id="@+id/app_placeholder"
layout="@layout/layout_app_placeholder" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:padding="32dp"
android:visibility="gone">
<TextView
android:id="@+id/empty_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="16dp"
android:text="@string/app_list_permission_denied"
android:textColor="?attr/colorOnBackground"
android:textSize="16sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/open_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/open_app_settings" />
</LinearLayout>
@@ -153,4 +153,8 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:listitem="@layout/layout_apps_item" />
<include
android:id="@+id/app_placeholder"
layout="@layout/layout_app_placeholder" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -495,4 +495,6 @@
<string name="reset_settings">恢复默认设置</string>
<string name="reset_settings_message">恢复默认设置,但节点、分组等数据将保留。如需完全清除数据,请在系统设置中直接清除应用数据。</string>
<string name="minimize">最小化</string>
<string name="app_list_permission_denied">无法读取已安装的应用。\n这通常是由于系统限制了应用的读取权限(例如某些中国厂商系统)。\n请在系统设置中授予权限。</string>
<string name="open_app_settings">打开系统设置</string>
</resources>
@@ -575,4 +575,6 @@
<string name="reset_settings">Restore default settings</string>
<string name="reset_settings_message">Restore default settings, but data such as nodes and groups will be retained. To completely clear data, clear application data directly in the system settings.</string>
<string name="minimize">Minimize</string>
<string name="app_list_permission_denied">Unable to read installed apps.\nThis is usually because the system has restricted app read permissions.\nPlease grant permissions in the system settings.</string>
<string name="open_app_settings">Open System Settings</string>
</resources>
+1 -1
View File
@@ -1,4 +1,4 @@
PACKAGE_NAME=moe.nb4a
VERSION_NAME=1.4.0
PRE_VERSION_NAME=pre-1.4.1-20251021-1
PRE_VERSION_NAME=pre-1.4.1-20251026-2
VERSION_CODE=44
+61
View File
@@ -91,6 +91,67 @@ jobs:
mkdir -p tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash
cp -rf ./luci-app-openclash/. tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/
- name: Copy OpenClash Source Codes
run: |
mkdir -p tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash
cp -rf ./luci-app-openclash/. tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/
- name: Update Third-Party Resources
run: |
CHNR_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/china_ip_route.ipset
CHNR6_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/china_ip6_route.ipset
YACD_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/usr/share/openclash/ui/yacd
ZASHBOARD_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/usr/share/openclash/ui/zashboard
METACUBEXD_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/usr/share/openclash/ui/metacubexd
GEOSITE_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/GeoSite.dat
COUNTRY_MMDB_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/Country.mmdb
# 更新 China IP Route
mkdir -p tmp
curl -sSL https://ispip.clang.cn/all_cn.txt -o tmp/china_ip_route.ipset
mkdir -p $(dirname $CHNR_PATH)
cp tmp/china_ip_route.ipset $CHNR_PATH
curl -sSL https://ispip.clang.cn/all_cn_ipv6.txt -o tmp/china_ip6_route.ipset
mkdir -p $(dirname $CHNR6_PATH)
cp tmp/china_ip6_route.ipset $CHNR6_PATH
# 更新 MetaCubeXD UI
mkdir -p tmp/metacubexd_zip
curl -sSL https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip -o tmp/metacubexd.zip
unzip -q -o tmp/metacubexd.zip -d tmp/metacubexd_zip
METACUBEXD_UNZIP_PATH="tmp/metacubexd_zip/metacubexd-gh-pages"
mkdir -p "$METACUBEXD_PATH"
rm -rf "$METACUBEXD_PATH"/*
cp -rf "$METACUBEXD_UNZIP_PATH"/* "$METACUBEXD_PATH"
# 更新 Yacd UI
mkdir -p tmp/yacd_zip
curl -sSL https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip -o tmp/yacd.zip
unzip -q -o tmp/yacd.zip -d tmp/yacd_zip
YACD_UNZIP_PATH="tmp/yacd_zip/Yacd-meta-gh-pages"
mkdir -p "$YACD_PATH"
rm -rf "$YACD_PATH"/*
cp -rf "$YACD_UNZIP_PATH"/* "$YACD_PATH"
# 更新 ZashBoard UI
mkdir -p tmp/zashboard_zip
curl -sSL https://github.com/Zephyruso/zashboard/releases/latest/download/dist-cdn-fonts.zip -o tmp/zashboard.zip
unzip -q -o tmp/zashboard.zip -d tmp/zashboard_zip
mkdir -p "$ZASHBOARD_PATH"
rm -rf "$ZASHBOARD_PATH"/*
cp -rf tmp/zashboard_zip/dist/* "$ZASHBOARD_PATH"
# 更新 GeoSite.dat
RULES_RELEASE=$(curl -s https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/latest | jq -r '.tag_name')
curl -sSL "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/${RULES_RELEASE}/geosite.dat" -o tmp/GeoSite.dat
mkdir -p $(dirname "$GEOSITE_PATH")
cp tmp/GeoSite.dat "$GEOSITE_PATH"
# 更新 Country.mmdb
curl -sSL "https://github.com/alecthw/mmdb_china_ip_list/releases/latest/download/Country-lite.mmdb" -o tmp/Country.mmdb
mkdir -p $(dirname "$COUNTRY_MMDB_PATH")
cp tmp/Country.mmdb "$COUNTRY_MMDB_PATH"
- name: Compile po2lmo
run: |
cd tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/tools/po2lmo
+1 -1
View File
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.47.015
PKG_VERSION:=0.47.022
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -4013,7 +4013,7 @@ function action_overwrite_subscribe_info()
end
uci:set("openclash", s[".name"], "order", order)
else
uci:set("openclash", s[".name"], "order", tonumber(order))
uci:set("openclash", s[".name"], "order", tonumber(order) or 1)
end
if s.enable == nil or (s.enable ~= nil and enable ~= nil) then
if enable == nil then
@@ -388,6 +388,10 @@ o.default = ""
o.placeholder = "Premium:0.9;SG:1.3"
o.description = translate("Nodes Weight Priority, <1 Means Lower Priority, >1 Means Higher Priority, The Default is 1, Pattern Support Regex and String")
o = s:taboption("smart", Flag, "smart_prefer_asn", font_red..bold_on..translate("Prefer-ASN")..bold_off..font_off)
o.description = translate("Select Nodes Force Lookup and Use Target ASN Info First For More Stable Experience")
o.default = 0
o = s:taboption("smart", Flag, "smart_enable_lgbm", font_red..bold_on..translate("Enable LightGBM Model")..bold_off..font_off)
o.description = font_red..bold_on..translate("Use LightGBM Model To Predict Weight")..bold_off..font_off
o.default = 0
@@ -2680,6 +2680,8 @@ var ConfigEditor = {
} else {
formData.append('enable', '0');
}
formData.append('order', sub.order || 1);
var progressContainer = form.querySelector('#overwrite-upload-progress');
var progressFill = form.querySelector('#overwrite-progress-fill');
var progressText = form.querySelector('#overwrite-progress-text');
@@ -95,7 +95,7 @@ local sectiontype = "_"..self.config.."_"..string.match(self.sectiontype, "[%w_]
#tab-header-<%=self.config%>-<%=self.sectiontype%> ul li{
flex: 1 1 0;
min-width: 0;
min-width: 120px;
width: 0;
display: flex;
align-items: center;
@@ -69,7 +69,7 @@ local sectiontype = "_"..self.config.."_"..string.match(self.sectiontype, "[%w_]
#tab-header-<%=self.config%>-<%=self.sectiontype%> ul li{
flex: 1 1 0;
min-width: 0;
min-width: 120px;
width: 0;
display: flex;
align-items: center;
@@ -2022,11 +2022,11 @@ msgstr "错误:OpenClash 启动失败,请到日志页面查看详细错误
msgid "Found 53 Port Hijacked, Clean Up Firewall Rules..."
msgstr "发现 53 端口被劫持,清理防火墙规则..."
msgid "OpenClash Start Running..."
msgstr "OpenClash 开始启动..."
msgid "Tip: OpenClash Start Running..."
msgstr "提示:OpenClash 开始启动..."
msgid "OpenClash Restart..."
msgstr "OpenClash 重新启动中..."
msgid "Tip: OpenClash Restart..."
msgstr "提示:OpenClash 重新启动中..."
msgid "Step 1: Get The Configuration..."
msgstr "第一步: 获取配置..."
@@ -2043,23 +2043,23 @@ msgstr "第三步: 快速启动模式,跳过修改配置文件..."
msgid "Step 4: Start Running The Clash Core..."
msgstr "第四步: 启动主程序..."
msgid "Step 5: Set Dnsmasq..."
msgstr "第五步: 设置 Dnsmasq 程序..."
msgid "Step 5: Add Cron Rules, Start Daemons..."
msgstr "第五步: 添加计划任务,启动进程守护程序..."
msgid "Step 6: Set Firewall Rules..."
msgstr "第六步: 设置防火墙规则..."
msgid "Step 6: Core Status Checking and Firewall Rules Setting..."
msgstr "第六步: 内核状态检查及防火墙规则设置..."
msgid "Step 7: Add Cron Rules, Start Daemons..."
msgstr "第七步: 添加计划任务,启动进程守护程序..."
msgid "Tip: OpenClash Start Successful!"
msgstr "提示:OpenClash 启动成功,请等待服务器上线!"
msgid "OpenClash Start Successful!"
msgstr "OpenClash 启动成功,请等待服务器上线"
msgid "Tip: Firewall Reload Successful!"
msgstr "提示:防火墙重置成功"
msgid "Warning: OpenClash Start Successful, Please Note That Network May Abnormal With IPv6's DHCP Server"
msgstr "警告:OpenClash 启动成功,检测到您启用了 IPv6 的 DHCP 服务,可能会造成连接异常!"
msgid "Warning: Please Note That Network May Abnormal With IPv6's DHCP Server"
msgstr "警告:检测到您启用了 IPv6 的 DHCP 服务,可能会造成连接异常!"
msgid "OpenClash Stoping..."
msgstr "OpenClash 开始关闭..."
msgid "Tip: OpenClash Stoping..."
msgstr "提示:OpenClash 开始关闭..."
msgid "Step 1: Backup The Current Groups State..."
msgstr "第一步: 备份当前策略组状态..."
@@ -2079,8 +2079,8 @@ msgstr "第五步: 重启 Dnsmasq 程序..."
msgid "Step 6: Delete OpenClash Residue File..."
msgstr "第六步:删除 OpenClash 残留文件..."
msgid "OpenClash Already Stop!"
msgstr "OpenClash 关闭成功"
msgid "Tip: OpenClash Already Stop!"
msgstr "提示:OpenClash 关闭!"
msgid "Skip Reload OpenClash Firewall Rules Until 5 Minutes Later..."
msgstr "5 分钟内重置已超过限制次数,跳过本次 OpenClash 防火墙规则重置..."
@@ -4192,4 +4192,13 @@ msgid "Subscription"
msgstr "订阅"
msgid "Overwrite Module"
msgstr "覆写模块"
msgstr "覆写模块"
msgid "module not found, please check your system depends and try again!"
msgstr "模块未找到,请检查你的固件依赖并重试!"
msgid "Select Nodes Force Lookup and Use Target ASN Info First For More Stable Experience"
msgstr "选择节点时强制查找并优先使用目标的 ASN 信息,以获得更稳定的体验"
msgid "Prefer-ASN"
msgstr "ASN 优先"
@@ -291,7 +291,10 @@ config dns_servers
config config_overwrite
option name 'default'
option type 'file'
option param 'EN_KEY1=URL1;EN_KEY12=URL2;EN_KEY13=URL3'
option order '0'
option enable '0'
option url 'https://raw.githubusercontent.com/vernesong/OpenClash/refs/heads/dev/luci-app-openclash/root/etc/openclash/overwrite/default'
option update_days 'off'
option update_hour 'off'
option type 'http'
option order '1'
@@ -95,7 +95,7 @@ set_dnsmasq_server() {
uci -q add_list dhcp.@dnsmasq[0].server="$1"
}
change_dns() {
load_ip_route_pass() {
local settype nftflag
if dnsmasq --version | grep -q 'Compile time options:.* nftset'; then
settype="nftset"
@@ -176,7 +176,13 @@ change_dns() {
fi
fi
fi
}
change_dns() {
# 区域绕过黑名单
load_ip_route_pass
# 第二 DNS 服务
/usr/share/openclash/openclash_custom_domain_dns.sh
if [ "$1" -eq 1 ]; then
@@ -645,12 +651,111 @@ do_run_file()
} >/dev/null 2>&1
check_mod()
{
modprobe $1
if [ -z "$(lsmod |awk '{print $1}' |grep ^$1$)" ]; then
LOG_OUT "Error:【$1】module not found, please check your system depends and try again!"
start_fail
fi
} >/dev/null 2>&1
check_core_status()
{
TUN_WAIT=0
TUN_RESTART=1
CORE_WAIT=0
CORE_HTTP_CODE=0
while ( [ -z "$(pidof clash)" ] && [ "$CORE_WAIT" -le 10 ] )
do
sleep 1
let CORE_WAIT++
done
if [ -n "$en_mode_tun" ] || [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
check_mod "tun"
if [ -n "$en_mode_tun" ]; then
ip_="ip"
else
ip_="ip -6"
fi
#wait 120s most for tun interface start
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -le 120 ] )
do
$ip_ link set utun up
let TUN_WAIT++
sleep 1
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -gt 120 ]; then
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -le 3 ] )
do
LOG_OUT "Warning: TUN Interface Start Failed, Try to Restart Again..."
kill_clash
start_run_core
sleep 120
let TUN_RESTART++
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -gt 3 ]; then
LOG_OUT "Warning: TUN Interface Start Failed, Please Check The Dependence or Try to Restart Again!"
start_fail
fi
fi
if [ -n "$(pidof clash)" ]; then
if [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
ip -6 rule del oif utun table 2022
ip -6 route del default dev utun table 2022
ip -6 route add default dev utun table "$PROXY_ROUTE_TABLE"
ip -6 rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
ip route add default dev utun table "$PROXY_ROUTE_TABLE"
ip rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
else
reg4='^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'
while ( [ -n "$(pidof clash)" ] && [ "$CORE_HTTP_CODE" != "200" ] && [ "$TUN_WAIT" -le 120 ] && [ -n "$(echo ${lan_ip} | grep -Eo ${reg4})" ] )
do
CORE_HTTP_CODE=$(curl -m 5 -o /dev/null -s -w '%{http_code}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${da_password}" -XGET http://${lan_ip}:${cn_port}/group)
let TUN_WAIT++
sleep 1
done
if [ -z "$(echo ${lan_ip} | grep -Eo ${reg4})" ]; then
LOG_OUT "Error: LAN IP Address Get Error, Please Check The LAN Interface Setting or Choose the Correct Interface in the Setting!"
fi
if [ "$CORE_HTTP_CODE" != "200" ]; then
LOG_OUT "Error: Core Status Abnormal, Please Check The Log Infos!"
start_fail
fi
fi
if [ -z "$(pidof clash)" ]; then
LOG_OUT "Error: Core Start Failed, Please Check The Log Infos!"
start_fail
fi
# redirect dns setting after core started, prevent core dns lookup failure
change_dns "$enable_redirect_dns"
set_firewall
if [ "$1" == "start" ]; then
LOG_OUT "Tip: OpenClash Start Successful!"
else
LOG_OUT "Tip: Firewall Reload Successful!"
fi
} >/dev/null 2>&1
start_run_core()
{
ulimit -SHn 1000000
ulimit -v unlimited
ulimit -u unlimited
modprobe tun
if ! $quick_start; then
mv "$TMP_CONFIG_FILE" "$CONFIG_FILE"
rm -rf "$TMP_CONFIG_FILE"
@@ -741,81 +846,6 @@ upnp_exclude()
fi
} >/dev/null 2>&1
check_core_status()
{
TUN_WAIT=0
TUN_RESTART=1
CORE_HTTP_CODE=0
if [ -z "$(pidof clash)" ]; then
sleep 5
fi
if [ -n "$en_mode_tun" ] || [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
if [ -n "$en_mode_tun" ]; then
ip_="ip"
else
ip_="ip -6"
fi
#wait 120s most for tun interface start
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -le 120 ] )
do
$ip_ link set utun up
let TUN_WAIT++
sleep 1
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -gt 120 ]; then
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -le 3 ] )
do
LOG_OUT "Warning: TUN Interface Start Failed, Try to Restart Again..."
kill_clash
start_run_core
sleep 120
let TUN_RESTART++
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -gt 3 ]; then
LOG_OUT "Warning: TUN Interface Start Failed, Please Check The Dependence or Try to Restart Again!"
start_fail
fi
fi
if [ -n "$(pidof clash)" ]; then
if [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
ip -6 rule del oif utun table 2022
ip -6 route del default dev utun table 2022
ip -6 route add default dev utun table "$PROXY_ROUTE_TABLE"
ip -6 rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
ip route add default dev utun table "$PROXY_ROUTE_TABLE"
ip rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
else
reg4='^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'
while ( [ -n "$(pidof clash)" ] && [ "$CORE_HTTP_CODE" != "200" ] && [ "$TUN_WAIT" -le 120 ] && [ -n "$(echo ${lan_ip} | grep -Eo ${reg4})" ] )
do
CORE_HTTP_CODE=$(curl -m 5 -o /dev/null -s -w '%{http_code}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${da_password}" -XGET http://${lan_ip}:${cn_port}/group)
let TUN_WAIT++
sleep 1
done
if [ -z "$(echo ${lan_ip} | grep -Eo ${reg4})" ]; then
LOG_OUT "Error: LAN IP Address Get Error, Please Check The LAN Interface Setting or Choose the Correct Interface in the Setting!"
fi
if [ "$CORE_HTTP_CODE" != "200" ]; then
LOG_OUT "Error: Core Status Abnormal, Please Check The Log Infos!"
start_fail
fi
fi
if [ -z "$(pidof clash)" ]; then
LOG_OUT "Error: Core Start Failed, Please Check The Log Infos!"
start_fail
fi
} >/dev/null 2>&1
firewall_lan_ac_traffic()
{
local src_port src_ip proto target enabled family dscp comment
@@ -1369,6 +1399,7 @@ if [ -n "$FW4" ]; then
CHNROUTE_WAIT=0
while ( [ -z "$(nft list sets |grep "set china_ip_route {")" ] && [ "$CHNROUTE_WAIT" -le 3 ] )
do
sleep 3
nft -f '/etc/openclash/china_ip_route.ipset'
let CHNROUTE_WAIT++
done
@@ -1575,7 +1606,7 @@ if [ -n "$FW4" ]; then
if [ -z "$en_mode_tun" ]; then
#udp
if [ "$enable_udp_proxy" -eq 1 ]; then
modprobe nft_tproxy
check_mod "nft_tproxy"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
nft 'add chain inet fw4 openclash_mangle'
@@ -1616,7 +1647,7 @@ if [ -n "$FW4" ]; then
nft 'add rule inet fw4 mangle_prerouting meta nfproto {ipv4} ip protocol udp counter jump openclash_mangle'
fi
if [ "$enable_udp_proxy" -ne 1 ] && [ "$en_mode" = "fake-ip" ]; then
modprobe nft_tproxy
check_mod "nft_tproxy"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
nft 'add chain inet fw4 openclash_mangle'
@@ -1795,6 +1826,7 @@ if [ -n "$FW4" ]; then
CHNROUTE_WAIT=0
while ( [ -z "$(nft list sets |grep "set china_ip6_route {")" ] && [ "$CHNROUTE_WAIT" -le 3 ] )
do
sleep 3
nft -f '/etc/openclash/china_ip6_route.ipset'
let CHNROUTE_WAIT++
done
@@ -2030,7 +2062,7 @@ if [ -n "$FW4" ]; then
#route
if [ "$ipv6_mode" -ne 2 ] && [ "$ipv6_mode" -ne 3 ]; then
if [ "$enable_v6_udp_proxy" -eq 1 ] || [ "$ipv6_mode" -eq 0 ]; then
modprobe nft_tproxy
check_mod "nft_tproxy"
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip -6 route add local ::/0 dev lo table "$PROXY_ROUTE_TABLE"
fi
@@ -2329,7 +2361,7 @@ if [ -z "$FW4" ]; then
if [ -z "$en_mode_tun" ]; then
#udp
if [ "$enable_udp_proxy" -eq 1 ]; then
modprobe xt_TPROXY
check_mod "xt_TPROXY"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
iptables -t mangle -N openclash
@@ -2369,7 +2401,7 @@ if [ -z "$FW4" ]; then
fi
if [ "$enable_udp_proxy" -ne 1 ] && [ "$en_mode" = "fake-ip" ]; then
modprobe xt_TPROXY
check_mod "xt_TPROXY"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
iptables -t mangle -N openclash
@@ -2784,7 +2816,7 @@ if [ -z "$FW4" ]; then
#route
if [ "$ipv6_mode" -ne 2 ] && [ "$ipv6_mode" -ne 3 ]; then
if [ "$enable_v6_udp_proxy" -eq 1 ] || [ "$ipv6_mode" -eq 0 ]; then
modprobe xt_TPROXY
check_mod "xt_TPROXY"
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip -6 route add local ::/0 dev lo table "$PROXY_ROUTE_TABLE"
fi
@@ -3078,6 +3110,7 @@ EOF
SMART_COLLECT:int_bool \
SMART_COLLECT_SIZE:int \
SMART_COLLECT_RATE:string \
SMART_PREFER_ASN:int_bool \
LGBM_AUTO_UPDATE:int_bool \
LGBM_UPDATE_INTERVAL:int \
LGBM_CUSTOM_URL:string \
@@ -3442,6 +3475,7 @@ get_config()
smart_strategy=$(uci_get_config "smart_strategy" || echo 0)
smart_policy_priority=$(uci_get_config "smart_policy_priority" || echo 0)
smart_enable_lgbm=$(uci_get_config "smart_enable_lgbm" || echo 0)
smart_prefer_asn=$(uci_get_config "smart_prefer_asn" || echo 0)
[ -z "$dns_port" ] && dns_port=7874 && uci -q set openclash.config.dns_port=7874
uci -q commit openclash
@@ -3452,7 +3486,7 @@ start_service()
enable=$(uci_get_config "enable")
[ "$enable" != "1" ] && LOG_OUT "Warning: OpenClash Now Disabled, Need Start From Luci Page, Exit..." && SLOG_CLEAN && exit 0
LOG_OUT "OpenClash Start Running..."
LOG_OUT "Tip: OpenClash Start Running..."
{
LOG_OUT "Step 1: Get The Configuration..."
@@ -3480,7 +3514,7 @@ start_service()
/usr/share/openclash/yml_rules_change.sh \
"$rule_source" "$enable_custom_clash_rules" "$TMP_CONFIG_FILE"\
"$enable_rule_proxy" "$CONFIG_NAME" "$router_self_proxy" "$lan_ip" "$enable_redirect_dns" "$en_mode"\
"$auto_smart_switch" "$smart_collect" "$smart_collect_rate" "$smart_strategy" "$smart_policy_priority" "$smart_enable_lgbm"
"$auto_smart_switch" "$smart_collect" "$smart_collect_rate" "$smart_strategy" "$smart_policy_priority" "$smart_enable_lgbm" "$smart_prefer_asn"
#Custom overwrite
if [ -f "/tmp/yaml_overwrite.sh" ]; then
@@ -3522,24 +3556,16 @@ start_service()
LOG_OUT "Step 4: Start Running The Clash Core..."
start_run_core
LOG_OUT "Step 5: Set Dnsmasq..."
change_dns "$enable_redirect_dns"
LOG_OUT "Step 6: Set Firewall Rules..."
set_firewall
check_core_status &
LOG_OUT "Step 7: Add Cron Rules, Start Daemons..."
LOG_OUT "Step 5: Add Cron Rules, Start Daemons..."
add_cron
if [ -z "$(uci -q get dhcp.lan.dhcpv6)" ] || [ "$(uci -q get dhcp.lan.dhcpv6)" == "disabled" ]; then
LOG_OUT "OpenClash Start Successful!"
elif [ "$ipv6_enable" -eq 0 ]; then
LOG_OUT "Warning: OpenClash Start Successful, Please Note That Network May Abnormal With IPv6's DHCP Server"
else
LOG_OUT "OpenClash Start Successful!"
LOG_OUT "Step 6: Core Status Checking and Firewall Rules Setting..."
check_core_status "start" &
if [ "$ipv6_enable" -eq 0 ] && [ "$(uci -q get dhcp.lan.dhcpv6)" != "disabled" ] && [ -n "$(uci -q get dhcp.lan.dhcpv6)" ]; then
LOG_OUT "Warning: Please Note That Network May Abnormal With IPv6's DHCP Server"
fi
write_run_quick
SLOG_CLEAN
rm -rf /tmp/yaml_*
@@ -3552,7 +3578,7 @@ stop_service()
{
enable=$(uci_get_config "enable")
LOG_OUT "OpenClash Stoping..."
LOG_OUT "Tip: OpenClash Stoping..."
LOG_OUT "Step 1: Backup The Current Groups State..."
{
@@ -3594,12 +3620,10 @@ stop_service()
${DNSMASQ_CONF_DIR}/dnsmasq_openclash_chnroute_pass.conf \
${DNSMASQ_CONF_DIR}/dnsmasq_openclash_chnroute6_pass.conf \
${DNSMASQ_CONF_DIR}/dnsmasq_openclash_custom_domain.conf
LOG_OUT "OpenClash Already Stop!"
else
LOG_OUT "OpenClash Already Stop!"
fi
LOG_OUT "Tip: OpenClash Already Stop!"
del_cron
clear_overwrite_set
rm -rf /tmp/yaml_*
@@ -3628,7 +3652,7 @@ revert_dnsmasq()
restart()
{
echo "OpenClash Restart..."
LOG_OUT "OpenClash Restart..."
LOG_OUT "Tip: OpenClash Restart..."
check_run_quick
stop
start
@@ -3669,18 +3693,18 @@ reload_service()
fi
LOG_OUT "【${CUR_RELOAD_NUM}/$MAX_RELOAD】Reload OpenClash Firewall Rules..."
revert_firewall
revert_dnsmasq
do_run_mode
get_config
set_firewall
check_core_status &
SLOG_CLEAN
fi
if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "manual" ]; then
LOG_OUT "Manually Reload Firewall Rules..."
revert_firewall
revert_dnsmasq
do_run_mode
get_config
set_firewall
check_core_status &
SLOG_CLEAN
fi
@@ -3692,20 +3716,9 @@ reload_service()
if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "restore" ]; then
do_run_mode
get_config
change_dns "$enable_redirect_dns"
set_firewall
check_core_status &
SLOG_CLEAN
fi
if [ "$enable" == "1" ] && [ "$1" == "core" ]; then
check_run_quick
do_run_mode
get_config
start_run_core
check_core_status
write_run_quick
SLOG_CLEAN
fi
} >/dev/null 2>&1
boot()
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -47,7 +47,7 @@ Google,ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,Google.
GoogleCN,ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,GoogleCN.yaml
GoogleFCM,ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,GoogleFCM.yaml
HBO(By ACL4SSR),ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,HBO.yaml,HBO-ACL4SSR.yaml
HBO MAX(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,MAX.yaml,MAX-lhie1.yaml
HBO MAX(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Max.yaml,MAX-lhie1.yaml
Hulu Japan,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Hulu Japan.yaml
Hulu(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Hulu.yaml,Hulu-lhie1.yaml
JOOX(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,JOOX.yaml,JOOX-lhie1.yaml
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as t,bC as r}from"./index-Csmv4Fkv.js";const o=({children:e})=>t(r,{get children(){return[e," - MetaCubeXD"]}});export{o as D};
@@ -0,0 +1,6 @@
import{N as o}from"./index-Csmv4Fkv.js";/**
* @license @tabler/icons-solidjs v3.26.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var e=o("outline","reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"}],["path",{d:"M20 4v5h-5"}]]);export{e as I};
@@ -0,0 +1 @@
import{u as O,d as e,ab as V,i as t,ac as I,ad as q,F as x,ae as H,af as Z,ag as d,ah as Q,ai as X,g as C,aj as W,ak as Y,al as J,Q as K,t as h,b as U,y as ee,A as z,am as te,T as re,Y as F,D as ae,B as j,a0 as le,_ as A,a1 as se,Z as G,a7 as ne,a9 as ie,l as oe}from"./index-Csmv4Fkv.js";import{c as ce,I as de,a as ue,f as P,b as ge,d as he,g as ve,e as me,j as fe,r as be}from"./index-CBBLUqwt.js";import{D as pe}from"./DocumentTitle-DG90V81t.js";var _e=h('<div class="flex flex-col gap-4"><div><select class="select select-bordered w-full"></select></div><div><select class="select select-bordered w-full"></select></div><div><select class="select select-bordered w-full">'),k=h("<option>");const $e=v=>{const[l]=O();return e(K,{ref:n=>{var o;return(o=v.ref)==null?void 0:o.call(v,n)},get icon(){return e(V,{size:24})},get title(){return l("logsSettings")},get children(){var n=_e(),o=n.firstChild,c=o.firstChild,_=o.nextSibling,f=_.firstChild,w=_.nextSibling,b=w.firstChild;return t(o,e(I,{withDivider:!0,get children(){return l("tableSize")}}),c),c.addEventListener("change",r=>q(r.target.value)),t(c,e(x,{get each(){return Object.values(H)},children:r=>(()=>{var s=k();return s.value=r,t(s,()=>l(r)),s})()})),t(_,e(I,{withDivider:!0,get children(){return l("logLevel")}}),f),f.addEventListener("change",r=>Z(r.target.value)),t(f,e(x,{get each(){return[d.Info,d.Error,d.Warning,d.Debug,d.Silent]},children:r=>(()=>{var s=k();return s.value=r,t(s,()=>l(r)),s})()})),t(w,e(I,{withDivider:!0,get children(){return l("logMaxRows")}}),b),b.addEventListener("change",r=>Q(parseInt(r.target.value))),t(b,e(x,{each:X,children:r=>(()=>{var s=k();return s.value=r,t(s,r),s})()})),C(()=>c.value=W()),C(()=>f.value=Y()),C(()=>b.value=J()),n}})};var Se=h("<span>"),xe=h('<div class="flex h-full flex-col gap-2"><div class="join w-full"><input type=search class="input input-sm join-item input-primary flex-1 flex-shrink-0"></div><div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300"><table><thead class="sticky top-0 z-10"></thead><tbody>'),Ce=h("<tr>"),we=h('<th class=bg-base-200><div class="flex items-center"><div>'),ye=h('<tr class="hover:!bg-primary hover:text-primary-content">'),Le=h("<td class=py-2>");const N=(v,l,n,o)=>{const c=be(v.getValue(l),n);return o({itemRank:c}),c.passed},Me=()=>{const v=U();if(!ee())return v("/setup",{replace:!0}),null;let l;const[n]=O(),[o,c]=z(""),{logs:_,paused:f,setPaused:w}=te(),[b,r]=re(z([]),{name:"logsTableSorting",storage:localStorage}),s=[{header:n("sequence"),accessorFn:i=>i.seq},{header:n("type"),accessorFn:i=>i.type,cell:({row:i})=>{const p=i.original.type;let u="";switch(p){case d.Error:u="text-error";break;case d.Warning:u="text-warning";break;case d.Info:u="text-info";break;case d.Debug:u="text-success";break}return(()=>{var $=Se();return F($,u),t($,()=>`[${i.original.type}]`),$})()}},{header:n("payload"),accessorFn:i=>i.payload}],M=ce({filterFns:{fuzzy:N},state:{get globalFilter(){return o()},get sorting(){return b()}},get data(){return _()},sortDescFirst:!0,columns:s,onGlobalFilterChange:c,onSortingChange:r,globalFilterFn:N,getFilteredRowModel:ve(),getSortedRowModel:me(),getCoreRowModel:fe()});return[e(pe,{get children(){return n("logs")}}),(()=>{var i=xe(),p=i.firstChild,u=p.firstChild,$=p.nextSibling,D=$.firstChild,R=D.firstChild,B=R.nextSibling;return u.$$input=a=>c(a.target.value),t(p,e(j,{class:"btn-primary join-item btn-sm",onClick:()=>w(a=>!a),get icon(){return ae(()=>!!f())()?e(de,{}):e(ue,{})}}),null),t(p,e(j,{class:"btn-primary join-item btn-sm",onClick:()=>l==null?void 0:l.showModal(),get icon(){return e(le,{})}}),null),t(R,e(A,{get each(){return M.getHeaderGroups()},children:a=>{const m=a();return(()=>{var g=Ce();return t(g,e(A,{get each(){return m.headers},children:y=>{const S=y();return(()=>{var E=we(),T=E.firstChild,L=T.firstChild;return se(L,"click",S.column.getToggleSortingHandler(),!0),t(L,()=>P(S.column.columnDef.header,S.getContext())),t(T,()=>({asc:e(ge,{}),desc:e(he,{})})[S.column.getIsSorted()]??null,null),C(()=>F(L,G(S.column.getCanSort()&&"cursor-pointer select-none","flex-1"))),E})()}})),g})()}})),t(B,e(x,{get each(){return M.getRowModel().rows},children:a=>(()=>{var m=ye();return t(m,e(x,{get each(){return a.getVisibleCells()},children:g=>(()=>{var y=Le();return t(y,()=>P(g.column.columnDef.cell,g.getContext())),y})()})),m})()})),t(i,e($e,{ref:a=>l=a}),null),C(a=>{var m=n("search"),g=G(ne(W()),"table relative rounded-none");return m!==a.e&&ie(u,"placeholder",a.e=m),g!==a.t&&F(D,a.t=g),a},{e:void 0,t:void 0}),i})()]};oe(["input","click"]);export{Me as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{u as B,a as T,b as q,c as z,o as H,e as h,d,f as M,i as o,g as N,S as X,B as S,I as G,F as J,t as x,z as b,h as U,s as w,j as K,k as C,l as O,m as Q,v as W,n as Y}from"./index-Csmv4Fkv.js";import{D as Z}from"./DocumentTitle-DG90V81t.js";const l=[];for(let t=0;t<256;++t)l.push((t+256).toString(16).slice(1));function tt(t,n=0){return(l[t[n+0]]+l[t[n+1]]+l[t[n+2]]+l[t[n+3]]+"-"+l[t[n+4]]+l[t[n+5]]+"-"+l[t[n+6]]+l[t[n+7]]+"-"+l[t[n+8]]+l[t[n+9]]+"-"+l[t[n+10]]+l[t[n+11]]+l[t[n+12]]+l[t[n+13]]+l[t[n+14]]+l[t[n+15]]).toLowerCase()}let v;const et=new Uint8Array(16);function nt(){if(!v){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");v=crypto.getRandomValues.bind(crypto)}return v(et)}const st=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),E={randomUUID:st};function lt(t,n,y){if(E.randomUUID&&!n&&!t)return E.randomUUID();t=t||{};const r=t.random||(t.rng||nt)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,tt(r)}var it=x("<option>"),at=x('<div class="mx-auto flex max-w-screen-sm flex-col items-center gap-4 py-10"><form class=contents><div class="flex w-full flex-col gap-4"><div class=flex-1><label class=label><span class=label-text></span></label><input name=url type=url class="input input-bordered w-full"placeholder=http(s)://{hostname}:{port} list=defaultEndpoints><datalist id=defaultEndpoints><option value=http://127.0.0.1:9090></option></datalist></div><div class=flex-1><label class=label><span class=label-text></span></label><input name=secret type=password class="input input-bordered w-full"placeholder=secret></div></div></form><div class="grid w-full grid-cols-2 gap-4">'),rt=x('<div class="badge badge-info flex w-full cursor-pointer items-center justify-between gap-4 py-4"><span class=truncate>');const ot=b.object({url:b.string().min(1),secret:b.string()}),ut=()=>{const[t]=B(),n=T(),y=q(),r=s=>{C(s),y("/overview",{replace:!0})},R=async s=>{const e=h().find(i=>i.id===s);e&&await U(e.url,e.secret)&&r(s)},g=async({url:s,secret:e})=>{const i=Q(s);if(!await U(i,e))return;const a=lt(),c=h().slice(),u=c.find(f=>f.url===i);if(!u){w([{id:a,url:i,secret:e},...c]),r(a);return}u.secret=e,u.id=a,w(c),r(a)},I=s=>{const{message:e}=s;Y.error(e)},{form:$}=z({extend:W({schema:ot}),onSubmit:g,onError:I}),L=s=>{K()===s&&C(""),w(h().filter(e=>e.id!==s))};return H(async()=>{var i,a;const s=n.search||window.location.search||((a=(i=n.hash.match(/\?.*$/))==null?void 0:i[0])==null?void 0:a.replace("?",""));if(!s)return;const e=new URLSearchParams(s);e.has("hostname")?await g({url:`${e.get("http")?"http:":e.get("https")?"https:":window.location.protocol}//${e.get("hostname")}${e.get("port")?`:${e.get("port")}`:""}`,secret:e.get("secret")??""}):h().length===0&&await g({url:"http://127.0.0.1:9090",secret:""})}),[d(Z,{get children(){return t("setup")}}),(()=>{var s=at(),e=s.firstChild,i=e.firstChild,a=i.firstChild,c=a.firstChild,u=c.firstChild,f=c.nextSibling,_=f.nextSibling;_.firstChild;var D=a.nextSibling,k=D.firstChild,j=k.firstChild,V=e.nextSibling;return M($,e,()=>$),o(u,()=>t("endpointURL")),o(_,d(X,{get when(){return window.location.origin!=="http://127.0.0.1:9090"},get children(){var p=it();return N(()=>p.value=window.location.origin),p}}),null),o(j,()=>t("secret")),o(i,d(S,{type:"submit",class:"btn-primary uppercase",get children(){return t("add")}}),null),o(V,d(J,{get each(){return h()},children:({id:p,url:F})=>(()=>{var m=rt(),P=m.firstChild;return m.$$click=()=>R(p),o(P,F),o(m,d(S,{class:"btn-circle btn-ghost btn-xs text-white",onClick:A=>{A.stopPropagation(),L(p)},get children(){return d(G,{})}}),null),m})()})),s})()]};O(["click"]);export{ut as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{W as a,b4 as m}from"./index-Csmv4Fkv.js";const s=o=>a(o).locale(m()).fromNow();export{s as f};
@@ -9,8 +9,8 @@
<meta name="theme-color" content="#000000" />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<link rel="apple-touch-icon" href="./pwa-192x192.png" />
<script type="module" crossorigin src="./assets/index-DIwJcTz_.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BaCG7ya-.css">
<script type="module" crossorigin src="./assets/index-Csmv4Fkv.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-M06kPDrB.css">
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
<body>
@@ -1 +1 @@
if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didnt register its module`);return s}));self.define=(n,r)=>{const l=s||("document"in self?document.currentScript.src:"")||location.href;if(e[l])return;let o={};const t=s=>i(s,l),u={module:{uri:l},exports:o,require:t};e[l]=Promise.all(n.map(s=>u[s]||t(s))).then(s=>(r(...s),o))}}define(["./workbox-3e8df8c8"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/apexcharts.esm-D-nlnKto.js",revision:null},{url:"assets/Config-OnPrERLZ.js",revision:null},{url:"assets/Connections-CgFIezGO.js",revision:null},{url:"assets/IconChevronRight-Dm97ewab.js",revision:null},{url:"assets/IconReload-BSlLPZuq.js",revision:null},{url:"assets/index-BaCG7ya-.css",revision:null},{url:"assets/index-DIwJcTz_.js",revision:null},{url:"assets/lib-BxRDUvxo.js",revision:null},{url:"assets/Logs-DcK4Yp9Y.js",revision:null},{url:"assets/Overview-BP3yBMkt.js",revision:null},{url:"assets/Proxies-BRo6NEi-.js",revision:null},{url:"assets/Rules-B-8TizmP.js",revision:null},{url:"assets/Setup-10EXNRX9.js",revision:null},{url:"index.html",revision:"655cfa8ccd499bf7a44ad8c22636badc"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"9367f610ffbd3bb959a69b706013d50e"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))});
if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didnt register its module`);return s})));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const t=s=>i(s,r),u={module:{uri:r},exports:o,require:t};e[r]=Promise.all(n.map((s=>u[s]||t(s)))).then((s=>(l(...s),o)))}}define(["./workbox-e1498109"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/Config-9NNS9COU.js",revision:null},{url:"assets/Connections-N_Z6THP_.js",revision:null},{url:"assets/DocumentTitle-DG90V81t.js",revision:null},{url:"assets/IconReload--QlVe2wP.js",revision:null},{url:"assets/index-CBBLUqwt.js",revision:null},{url:"assets/index-Csmv4Fkv.js",revision:null},{url:"assets/index-M06kPDrB.css",revision:null},{url:"assets/Logs-uIQcQmXC.js",revision:null},{url:"assets/Overview-B99qGorf.js",revision:null},{url:"assets/Proxies-Lk5uJ4LX.js",revision:null},{url:"assets/Rules-C4_l0aqo.js",revision:null},{url:"assets/Setup-CdphtcBj.js",revision:null},{url:"assets/time-CHbJgbks.js",revision:null},{url:"index.html",revision:"0ee677309471325e9389528536c80875"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"f5b3372f312fbbe60a6ed8c03741ff80"},{url:"pwa-192x192.png",revision:"c45f48fc59b5bf47e6cbf1626aff51fc"},{url:"pwa-512x512.png",revision:"a311504ae6a46bd29b5678a410aaafc6"},{url:"manifest.webmanifest",revision:"f0952d333375ba4273b4372ffa349b8b"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
@@ -0,0 +1 @@
board.zash.run.place
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
/>
<meta
name="description"
content="A dashboard using clash API"
content="A dashboard using clash api"
/>
<link
rel="apple-touch-icon"
@@ -30,10 +30,10 @@
name="theme-color"
content="#FFFFFF"
/>
<script type="module" crossorigin src="./assets/index-CcFj958A.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-B-U6Un3o.css">
<script type="module" crossorigin src="./assets/index-DnsHUhFc.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DrFVUP5k.css">
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
<body class="overflow-hidden">
<body>
<div id="app"></div>
</body>
</html>
@@ -1 +1 @@
{"name":"zashboard","short_name":"zashboard","description":"a dashboard using clash api","start_url":"./","display":"standalone","background_color":"#ffffff","theme_color":"#000000","lang":"en","scope":"./","icons":[{"src":"./pwa-192x192.png","sizes":"192x192","type":"image/png","purpose":"any"},{"src":"./pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any"},{"src":"./pwa-maskable-192x192.png","sizes":"192x192","type":"image/png","purpose":"maskable"},{"src":"./pwa-maskable-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}]}
{"name":"zashboard","short_name":"zashboard","start_url":"./","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","description":"a dashboard using clash api","theme_color":"#000000","icons":[{"src":"./pwa-192x192.png","sizes":"192x192","type":"image/png","purpose":"any"},{"src":"./pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any"},{"src":"./pwa-maskable-192x192.png","sizes":"192x192","type":"image/png","purpose":"maskable"},{"src":"./pwa-maskable-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}]}
@@ -1 +1 @@
if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didnt register its module`);return e}));self.define=(s,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let c={};const o=e=>n(e,f),d={module:{uri:f},exports:c,require:o};i[f]=Promise.all(s.map(e=>d[e]||o(e))).then(e=>(r(...e),c))}}define(["./workbox-3e8df8c8"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-B-U6Un3o.css",revision:null},{url:"assets/index-CcFj958A.js",revision:null},{url:"index.html",revision:"7115f47d5ebd00ba74dfe824825329ce"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"6437e90df75a01bce95a7c03b16fc311"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didnt register its module`);return e})));self.define=(n,r)=>{const d=e||("document"in self?document.currentScript.src:"")||location.href;if(i[d])return;let f={};const c=e=>s(e,d),o={module:{uri:d},exports:f,require:c};i[d]=Promise.all(n.map((e=>o[e]||c(e)))).then((e=>(r(...e),f)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-DnsHUhFc.js",revision:null},{url:"assets/index-DrFVUP5k.css",revision:null},{url:"index.html",revision:"b9c89c6ddeb9522dd6cfbb2001a09b88"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
File diff suppressed because one or more lines are too long
@@ -809,7 +809,7 @@ yml_other_set()
if '${10}' == '1' and ['url-test', 'load-balance'].include?(group['type']) then
group['type'] = 'smart';
group['uselightgbm'] = true if '${15}' == '1';
group['strategy'] = '${13}';
group['strategy'] = '${13}' if '${13}' != '0';
group['collectdata'] = true if '${11}' == '1';
group['sample-rate'] = '${12}'.to_f if '${11}' == '1';
end;
@@ -826,6 +826,9 @@ yml_other_set()
if '${15}' == '1' and group['type'] == 'smart' then
group['uselightgbm'] = true;
end;
if '${16}' == '1' and group['type'] == 'smart' then
group['prefer-asn'] = true;
end;
};
};
end;
@@ -890,7 +893,7 @@ if [ "$1" != "0" ]; then
config_foreach yml_other_rules_get "other_rules" "$5"
if [ -z "$rule_name" ]; then
SKIP_CUSTOM_OTHER_RULES=1
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}"
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}"
exit 0
elif [ "$rule_name" = "lhie1" ]; then
@@ -905,7 +908,7 @@ if [ "$1" != "0" ]; then
if [ -n "$group" ] && [ -z "$(echo "$PROXY_GROUP_CACHE" | grep -F "$group")" ]; then
LOG_OUT "Warning: Because of The Different Porxy-Group's Name, Stop Setting The Other Rules!"
SKIP_CUSTOM_OTHER_RULES=1
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}"
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}"
exit 0
fi
done
@@ -913,9 +916,9 @@ if [ "$1" != "0" ]; then
if [ -z "$Proxy" ]; then
LOG_OUT "Error: Missing Porxy-Group's Name, Stop Setting The Other Rules!"
SKIP_CUSTOM_OTHER_RULES=1
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}"
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}"
exit 0
fi
fi
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}"
yml_other_set "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}"
+1 -1
View File
@@ -16,7 +16,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-amlogic
PKG_VERSION:=3.1.270
PKG_VERSION:=3.1.273
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 License
@@ -189,14 +189,15 @@ check_updated() {
)"
# Set the regular expression for the OpenWrt filename
op_file_pattern=".*_${BOARD}_.*k${main_line_version}\..*${firmware_suffix}"
op_file_pattern=".*_${BOARD}_.*k${main_line_version}\.[0-9]+.*${firmware_suffix}"
# Find the <li> list item where the OpenWrt file is located
li_block=$(awk -v pattern="${op_file_pattern}" -v RS='</li>' '$0 ~ pattern { print $0 "</li>"; exit }' <<<"${html_code}")
[[ -z "${li_block}" ]] && tolog "02.03.01 No matching download links found." "1"
# Find the OpenWrt filename
latest_url=$(echo "${li_block}" | grep -o "/[^\"]*_${BOARD}_.*k${main_line_version}\.[^\"']*${firmware_suffix}" | sort -urV | head -n 1 | xargs basename 2>/dev/null)
latest_url=$(echo "${li_block}" | grep -oE "/[^\"]*_${BOARD}_.*k${main_line_version}\.[0-9]+[^\"]*${firmware_suffix}" | sort -urV | head -n 1 | xargs basename 2>/dev/null)
tolog "02.03.02 OpenWrt file: ${latest_url}"
# Find the date of the latest update
latest_updated_at=$(echo "${li_block}" | grep -o 'datetime="[^"]*"' | sed 's/datetime="//; s/"//')
tolog "02.03.03 Latest updated at: ${latest_updated_at}"
@@ -204,35 +205,39 @@ check_updated() {
date_display_format="$(echo ${latest_updated_at} | tr 'T' '(' | tr 'Z' ')')"
[[ -z "${latest_url}" || -z "${latest_updated_at}" ]] && tolog "02.03.04 The download URL or date is invalid." "1"
# Find the firmware sha256 value
latest_firmware_sha256="$(echo "${li_block}" | grep -o 'value="sha256:[^"]*' | sed 's/value="sha256://')"
tolog "02.03.05 OpenWrt sha256: ${latest_firmware_sha256}"
# Check the firmware update code
down_check_code="${latest_updated_at}.${main_line_version}"
op_release_code="${FIRMWARE_DOWNLOAD_PATH}/.luci-app-amlogic/op_release_code"
if [[ -s "${op_release_code}" ]]; then
update_check_code="$(cat ${op_release_code} | xargs)"
if [[ -n "${update_check_code}" && "${update_check_code}" == "${down_check_code}" ]]; then
tolog "02.03.05 Already the latest version, no need to update." "1"
tolog "02.04 Already the latest version, no need to update." "1"
fi
fi
# Prompt to update
if [[ -n "${latest_url}" ]]; then
tolog '<input type="button" class="cbi-button cbi-button-reload" value="Download" onclick="return b_check_firmware(this, '"'download_${latest_updated_at}@${firmware_releases_tag}/${latest_url}'"')"/> Latest updated: '${date_display_format}'' "1"
tolog '<input type="button" class="cbi-button cbi-button-reload" value="Download" onclick="return b_check_firmware(this, '"'download_${latest_updated_at}@${firmware_releases_tag}/${latest_url}@${latest_firmware_sha256}'"')"/> Latest updated: '${date_display_format}'' "1"
else
tolog "02.04 No OpenWrt available, please use another kernel branch." "1"
tolog "02.05 No OpenWrt available, please use another kernel branch." "1"
fi
exit 0
}
# 03. Download Openwrt firmware
# 03. Download Openwrt
download_firmware() {
tolog "03. Download Openwrt firmware..."
tolog "03. Start download the Openwrt..."
# Get the openwrt firmware download path
if [[ "${download_version}" == "download_"* ]]; then
tolog "03.01 Start downloading..."
else
tolog "03.02 Invalid parameter." "1"
tolog "03.01 Invalid parameter." "1"
fi
# Delete other residual firmware files
@@ -250,26 +255,28 @@ download_firmware() {
firmware_download_oldname="${opfile_path//%2B/+}"
latest_url="https://github.com/${server_firmware_url}/releases/download/${firmware_download_oldname}"
# Find the firmware sha256 value
releases_firmware_sha256sums="$(echo ${download_version} | awk -F'@' '{print $3}')"
# Download to OpenWrt file
firmware_download_name="openwrt_${BOARD}_k${main_line_version}_github${firmware_suffix}"
curl -fsSL "${latest_url}" -o "${FIRMWARE_DOWNLOAD_PATH}/${firmware_download_name}"
if [[ "$?" -eq "0" && -s "${FIRMWARE_DOWNLOAD_PATH}/${firmware_download_name}" ]]; then
tolog "03.01 OpenWrt downloaded successfully."
tolog "03.02 OpenWrt downloaded successfully."
else
tolog "03.02 OpenWrt download failed." "1"
fi
# Download sha256sums file
if curl -fsSL "${latest_url}.sha" -o "${FIRMWARE_DOWNLOAD_PATH}/sha256sums" 2>/dev/null; then
tolog "03.03 sha file downloaded successfully."
# Verify sha256sums if available
if [[ -n "${releases_firmware_sha256sums}" ]]; then
tolog "03.03 Perform sha256 checksum verification."
# If there is a sha256sum file, compare it
releases_firmware_sha256sums="$(cat ${FIRMWARE_DOWNLOAD_PATH}/sha256sums | grep ${firmware_download_oldname##*/} | awk '{print $1}')"
download_firmware_sha256sums="$(sha256sum ${FIRMWARE_DOWNLOAD_PATH}/${firmware_download_name} | awk '{print $1}')"
if [[ -n "${releases_firmware_sha256sums}" && "${releases_firmware_sha256sums}" != "${download_firmware_sha256sums}" ]]; then
tolog "03.04 sha256sum verification mismatched." "1"
if [[ "${releases_firmware_sha256sums}" != "${download_firmware_sha256sums}" ]]; then
tolog "03.03.01 sha256sum verification mismatched." "1"
else
tolog "03.05 sha256sum verification succeeded."
tolog "03.03.02 sha256sum verification succeeded."
fi
fi
@@ -104,7 +104,7 @@ tolog "PLATFORM: [ ${PLATFORM} ], SOC: [ ${SOC} ], Use in [ ${EMMC_NAME} ]"
sleep 2
# Step 1. Set the kernel query api
tolog "01. Start checking the kernel version."
tolog "01. Start checking the kernel repository."
firmware_repo="$(uci get amlogic.config.amlogic_firmware_repo 2>/dev/null)"
[[ -n "${firmware_repo}" ]] || tolog "01.01 The custom kernel download repo is invalid." "1"
kernel_repo="$(uci get amlogic.config.amlogic_kernel_path 2>/dev/null)"
@@ -173,19 +173,28 @@ check_kernel() {
latest_version="$(
curl -fsSL -m 10 \
${kernel_api}/releases/expanded_assets/kernel_${kernel_tag} |
grep -oE "${main_line_version}\.[0-9]+\.tar\.gz" | sed 's/.tar.gz//' |
grep -oE "${main_line_version}\.[0-9]+[^\"]*\.tar\.gz" | sed 's/.tar.gz//' |
sort -urV | head -n 1
)"
[[ -n "${latest_version}" ]] || tolog "02.03 No kernel available, please use another kernel branch." "1"
tolog "02.03 current version: ${current_kernel_v}, Latest version: ${latest_version}"
tolog "02.04 current version: ${current_kernel_v}, Latest version: ${latest_version}"
sleep 2
# Get the sha256 value of the latest version
latest_kernel_sha256="$(
curl -fsSL -m 10 \
${kernel_api}/releases/expanded_assets/kernel_${kernel_tag} |
awk -v pattern="${latest_version}\.tar\.gz" -v RS='</li>' '$0 ~ pattern { print $0 "</li>"; exit }' |
grep -o 'value="sha256:[^"]*' | sed 's/value="sha256://'
)"
[[ -n "${latest_kernel_sha256}" ]] && tolog "02.05 Kernel sha256: ${latest_kernel_sha256}"
if [[ "${latest_version}" == "${current_kernel_v}" ]]; then
tolog "02.04 Already the latest version, no need to update." "1"
tolog "02.06 Already the latest version, no need to update." "1"
sleep 2
else
tolog '<input type="button" class="cbi-button cbi-button-reload" value="Download" onclick="return b_check_kernel(this, '"'download_${latest_version}'"')"/> Latest version: '${latest_version}'' "1"
tolog '<input type="button" class="cbi-button cbi-button-reload" value="Download" onclick="return b_check_kernel(this, '"'download_${latest_version}_${latest_kernel_sha256}'"')"/> Latest version: '${latest_version}'' "1"
fi
exit 0
@@ -193,34 +202,54 @@ check_kernel() {
# Step 3: Download the latest kernel version
download_kernel() {
tolog "03. Start download the kernels."
tolog "03. Start download the kernel file."
if [[ "${download_version}" == "download_"* ]]; then
download_version="$(echo "${download_version}" | cut -d '_' -f2)"
tolog "03.01 The kernel version: ${download_version}, downloading..."
tolog "03.01 Start downloading..."
else
tolog "03.02 Invalid parameter" "1"
tolog "03.01 Invalid parameter" "1"
fi
# Get the kernel file name
kernel_file_name="$(echo "${download_version}" | cut -d '_' -f2)"
# Restore converted characters in file names(%2B to +)
kernel_file_name="${kernel_file_name//%2B/+}"
# Get the sha256 value
kernel_file_sha256="$(echo "${download_version}" | cut -d '_' -f3)"
# Delete other residual kernel files
rm -f ${KERNEL_DOWNLOAD_PATH}/*.tar.gz
rm -f ${KERNEL_DOWNLOAD_PATH}/sha256sums
rm -rf ${KERNEL_DOWNLOAD_PATH}/${download_version}*
rm -rf ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}*
kernel_down_from="https://github.com/${kernel_repo}/releases/download/kernel_${kernel_tag}/${download_version}.tar.gz"
kernel_down_from="https://github.com/${kernel_repo}/releases/download/kernel_${kernel_tag}/${kernel_file_name}.tar.gz"
curl -fsSL "${kernel_down_from}" -o ${KERNEL_DOWNLOAD_PATH}/${download_version}.tar.gz
[[ "${?}" -ne "0" ]] && tolog "03.03 The kernel download failed." "1"
curl -fsSL "${kernel_down_from}" -o ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}.tar.gz
[[ "${?}" -ne "0" ]] && tolog "03.02 The kernel download failed." "1"
tar -xf ${KERNEL_DOWNLOAD_PATH}/${download_version}.tar.gz -C ${KERNEL_DOWNLOAD_PATH}
[[ "${?}" -ne "0" ]] && tolog "03.04 Kernel decompression failed." "1"
mv -f ${KERNEL_DOWNLOAD_PATH}/${download_version}/* ${KERNEL_DOWNLOAD_PATH}/
# Verify sha256
if [[ -n "${kernel_file_sha256}" ]]; then
tolog "03.03 Perform sha256 checksum verification."
download_kernel_sha256sums="$(sha256sum ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}.tar.gz | awk '{print $1}')"
if [[ "${kernel_file_sha256}" != "${download_kernel_sha256sums}" ]]; then
tolog "03.03.01 sha256sum verification mismatched." "1"
else
tolog "03.03.02 sha256sum verification succeeded."
fi
fi
# Decompress the kernel package
tolog "03.04 Start decompressing the kernel package..."
tar -xf ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}.tar.gz -C ${KERNEL_DOWNLOAD_PATH}
[[ "${?}" -ne "0" ]] && tolog "03.05 Kernel decompression failed." "1"
mv -f ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}/* ${KERNEL_DOWNLOAD_PATH}/
sync && sleep 3
# Delete the downloaded kernel file
rm -f ${KERNEL_DOWNLOAD_PATH}/${download_version}.tar.gz
rm -rf ${KERNEL_DOWNLOAD_PATH}/${download_version}
rm -f ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}.tar.gz
rm -rf ${KERNEL_DOWNLOAD_PATH}/${kernel_file_name}
tolog "03.05 The kernel is ready, you can update."
tolog "03.06 The kernel is ready, you can update."
sleep 2
#echo '<a href="javascript:;" onclick="return amlogic_kernel(this)">Update</a>' >$START_LOG
+3 -3
View File
@@ -3,7 +3,7 @@
欢迎来到sirpdboy的源码仓库!
=
# Lucky(大吉)
# Lucky
本项目是 ([Lucky](https://github.com/gdy666/lucky)) 在 OpenWrt 上的移植。
@@ -11,7 +11,7 @@ luci-app-lucky 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/u
[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
[luci-app-lucky Lucky(大吉)](https://github.com/sirpdboy/luci-app-lucky)
[luci-app-lucky Lucky](https://github.com/sirpdboy/luci-app-lucky)
======================
@@ -19,7 +19,7 @@ luci-app-lucky 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/u
## 功能说明:
### Lucky(大吉)
### Lucky
#### 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
Binary file not shown.

Before

Width:  |  Height:  |  Size: 781 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 389 KiB

@@ -2,7 +2,7 @@ msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Lucky"
msgstr "Lucky大吉"
msgstr "Lucky"
msgid "Lucky Control panel"
msgstr "Lucky操作台"
+8 -13
View File
@@ -19,6 +19,9 @@ endif
ifeq ($(ARCH),mips)
LUCKY_ARCH:=mips_softfloat
endif
ifeq ($(ARCH),86)
LUCKY_ARCH:=i386
endif
ifeq ($(ARCH),i386)
LUCKY_ARCH:=i386
endif
@@ -26,25 +29,17 @@ ifeq ($(ARCH),x86_64)
LUCKY_ARCH:=x86_64
endif
ifeq ($(ARCH),arm)
ifeq ($(BOARD),bcm53xx)
LUCKY_ARCH:=armv6
else
LUCKY_ARCH:=armv5
endif
ifeq ($(ARCH),arm7)
LUCKY_ARCH:=armv7
endif
endif
ifeq ($(BOARD),bcm53xx)
LUCKY_ARCH:=armv6
ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),)
LUCKY_ARCH:=armv5
endif
endif
ifeq ($(BOARD),kirkwood)
LUCKY_ARCH:=armv5
ifeq ($(ARCH),armv8)
LUCKY_ARCH:=arm64
endif
ifeq ($(ARCH),aarch64)
LUCKY_ARCH:=arm64
endif
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=GDY666 <gdy666@foxmail.com>
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
sdk:
- 24.10.2
- 24.10.3
arch:
- aarch64_cortex-a53
- x86_64
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
sdk:
- 24.10.2
- 24.10.3
arch:
- aarch64_cortex-a53
- aarch64_cortex-a72
+3 -3
View File
@@ -9,9 +9,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
PKG_SOURCE_DATE:=2025-10-12
PKG_SOURCE_VERSION:=07d3c6f4dc290fae5ca6152ebcb37d6815c411ab
PKG_MIRROR_HASH:=f0832f29ea84e9458ae603bc556a2d39dbb3e6a65e5698e02ab753e8f90892b9
PKG_SOURCE_DATE:=2025-10-26
PKG_SOURCE_VERSION:=092f4f0d612e5982728c8b872c2e69cf3d04b21f
PKG_MIRROR_HASH:=e7d1de40a1e729645686c5a1fc74d7e457b2016b82b68633d3e01194b3b61786
PKG_LICENSE:=BSD 3-Clause
PKG_LICENSE_FILES:=LICENSE
+2 -2
View File
@@ -3,7 +3,7 @@
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 2288
#define LAST_COMMIT_POSITION "2288 (07d3c6f4dc29)"
#define LAST_COMMIT_POSITION_NUM 2289
#define LAST_COMMIT_POSITION "2289 (092f4f0d612e)"
#endif // OUT_LAST_COMMIT_POSITION_H_
+1 -1
View File
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.47.015
PKG_VERSION:=0.47.022
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -4013,7 +4013,7 @@ function action_overwrite_subscribe_info()
end
uci:set("openclash", s[".name"], "order", order)
else
uci:set("openclash", s[".name"], "order", tonumber(order))
uci:set("openclash", s[".name"], "order", tonumber(order) or 1)
end
if s.enable == nil or (s.enable ~= nil and enable ~= nil) then
if enable == nil then
@@ -388,6 +388,10 @@ o.default = ""
o.placeholder = "Premium:0.9;SG:1.3"
o.description = translate("Nodes Weight Priority, <1 Means Lower Priority, >1 Means Higher Priority, The Default is 1, Pattern Support Regex and String")
o = s:taboption("smart", Flag, "smart_prefer_asn", font_red..bold_on..translate("Prefer-ASN")..bold_off..font_off)
o.description = translate("Select Nodes Force Lookup and Use Target ASN Info First For More Stable Experience")
o.default = 0
o = s:taboption("smart", Flag, "smart_enable_lgbm", font_red..bold_on..translate("Enable LightGBM Model")..bold_off..font_off)
o.description = font_red..bold_on..translate("Use LightGBM Model To Predict Weight")..bold_off..font_off
o.default = 0
@@ -2680,6 +2680,8 @@ var ConfigEditor = {
} else {
formData.append('enable', '0');
}
formData.append('order', sub.order || 1);
var progressContainer = form.querySelector('#overwrite-upload-progress');
var progressFill = form.querySelector('#overwrite-progress-fill');
var progressText = form.querySelector('#overwrite-progress-text');
@@ -95,7 +95,7 @@ local sectiontype = "_"..self.config.."_"..string.match(self.sectiontype, "[%w_]
#tab-header-<%=self.config%>-<%=self.sectiontype%> ul li{
flex: 1 1 0;
min-width: 0;
min-width: 120px;
width: 0;
display: flex;
align-items: center;
@@ -69,7 +69,7 @@ local sectiontype = "_"..self.config.."_"..string.match(self.sectiontype, "[%w_]
#tab-header-<%=self.config%>-<%=self.sectiontype%> ul li{
flex: 1 1 0;
min-width: 0;
min-width: 120px;
width: 0;
display: flex;
align-items: center;
@@ -2022,11 +2022,11 @@ msgstr "错误:OpenClash 启动失败,请到日志页面查看详细错误
msgid "Found 53 Port Hijacked, Clean Up Firewall Rules..."
msgstr "发现 53 端口被劫持,清理防火墙规则..."
msgid "OpenClash Start Running..."
msgstr "OpenClash 开始启动..."
msgid "Tip: OpenClash Start Running..."
msgstr "提示:OpenClash 开始启动..."
msgid "OpenClash Restart..."
msgstr "OpenClash 重新启动中..."
msgid "Tip: OpenClash Restart..."
msgstr "提示:OpenClash 重新启动中..."
msgid "Step 1: Get The Configuration..."
msgstr "第一步: 获取配置..."
@@ -2043,23 +2043,23 @@ msgstr "第三步: 快速启动模式,跳过修改配置文件..."
msgid "Step 4: Start Running The Clash Core..."
msgstr "第四步: 启动主程序..."
msgid "Step 5: Set Dnsmasq..."
msgstr "第五步: 设置 Dnsmasq 程序..."
msgid "Step 5: Add Cron Rules, Start Daemons..."
msgstr "第五步: 添加计划任务,启动进程守护程序..."
msgid "Step 6: Set Firewall Rules..."
msgstr "第六步: 设置防火墙规则..."
msgid "Step 6: Core Status Checking and Firewall Rules Setting..."
msgstr "第六步: 内核状态检查及防火墙规则设置..."
msgid "Step 7: Add Cron Rules, Start Daemons..."
msgstr "第七步: 添加计划任务,启动进程守护程序..."
msgid "Tip: OpenClash Start Successful!"
msgstr "提示:OpenClash 启动成功,请等待服务器上线!"
msgid "OpenClash Start Successful!"
msgstr "OpenClash 启动成功,请等待服务器上线"
msgid "Tip: Firewall Reload Successful!"
msgstr "提示:防火墙重置成功"
msgid "Warning: OpenClash Start Successful, Please Note That Network May Abnormal With IPv6's DHCP Server"
msgstr "警告:OpenClash 启动成功,检测到您启用了 IPv6 的 DHCP 服务,可能会造成连接异常!"
msgid "Warning: Please Note That Network May Abnormal With IPv6's DHCP Server"
msgstr "警告:检测到您启用了 IPv6 的 DHCP 服务,可能会造成连接异常!"
msgid "OpenClash Stoping..."
msgstr "OpenClash 开始关闭..."
msgid "Tip: OpenClash Stoping..."
msgstr "提示:OpenClash 开始关闭..."
msgid "Step 1: Backup The Current Groups State..."
msgstr "第一步: 备份当前策略组状态..."
@@ -2079,8 +2079,8 @@ msgstr "第五步: 重启 Dnsmasq 程序..."
msgid "Step 6: Delete OpenClash Residue File..."
msgstr "第六步:删除 OpenClash 残留文件..."
msgid "OpenClash Already Stop!"
msgstr "OpenClash 关闭成功"
msgid "Tip: OpenClash Already Stop!"
msgstr "提示:OpenClash 关闭!"
msgid "Skip Reload OpenClash Firewall Rules Until 5 Minutes Later..."
msgstr "5 分钟内重置已超过限制次数,跳过本次 OpenClash 防火墙规则重置..."
@@ -4192,4 +4192,13 @@ msgid "Subscription"
msgstr "订阅"
msgid "Overwrite Module"
msgstr "覆写模块"
msgstr "覆写模块"
msgid "module not found, please check your system depends and try again!"
msgstr "模块未找到,请检查你的固件依赖并重试!"
msgid "Select Nodes Force Lookup and Use Target ASN Info First For More Stable Experience"
msgstr "选择节点时强制查找并优先使用目标的 ASN 信息,以获得更稳定的体验"
msgid "Prefer-ASN"
msgstr "ASN 优先"
@@ -291,7 +291,10 @@ config dns_servers
config config_overwrite
option name 'default'
option type 'file'
option param 'EN_KEY1=URL1;EN_KEY12=URL2;EN_KEY13=URL3'
option order '0'
option enable '0'
option url 'https://raw.githubusercontent.com/vernesong/OpenClash/refs/heads/dev/luci-app-openclash/root/etc/openclash/overwrite/default'
option update_days 'off'
option update_hour 'off'
option type 'http'
option order '1'
+133 -120
View File
@@ -95,7 +95,7 @@ set_dnsmasq_server() {
uci -q add_list dhcp.@dnsmasq[0].server="$1"
}
change_dns() {
load_ip_route_pass() {
local settype nftflag
if dnsmasq --version | grep -q 'Compile time options:.* nftset'; then
settype="nftset"
@@ -176,7 +176,13 @@ change_dns() {
fi
fi
fi
}
change_dns() {
# 区域绕过黑名单
load_ip_route_pass
# 第二 DNS 服务
/usr/share/openclash/openclash_custom_domain_dns.sh
if [ "$1" -eq 1 ]; then
@@ -645,12 +651,111 @@ do_run_file()
} >/dev/null 2>&1
check_mod()
{
modprobe $1
if [ -z "$(lsmod |awk '{print $1}' |grep ^$1$)" ]; then
LOG_OUT "Error:【$1】module not found, please check your system depends and try again!"
start_fail
fi
} >/dev/null 2>&1
check_core_status()
{
TUN_WAIT=0
TUN_RESTART=1
CORE_WAIT=0
CORE_HTTP_CODE=0
while ( [ -z "$(pidof clash)" ] && [ "$CORE_WAIT" -le 10 ] )
do
sleep 1
let CORE_WAIT++
done
if [ -n "$en_mode_tun" ] || [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
check_mod "tun"
if [ -n "$en_mode_tun" ]; then
ip_="ip"
else
ip_="ip -6"
fi
#wait 120s most for tun interface start
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -le 120 ] )
do
$ip_ link set utun up
let TUN_WAIT++
sleep 1
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -gt 120 ]; then
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -le 3 ] )
do
LOG_OUT "Warning: TUN Interface Start Failed, Try to Restart Again..."
kill_clash
start_run_core
sleep 120
let TUN_RESTART++
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -gt 3 ]; then
LOG_OUT "Warning: TUN Interface Start Failed, Please Check The Dependence or Try to Restart Again!"
start_fail
fi
fi
if [ -n "$(pidof clash)" ]; then
if [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
ip -6 rule del oif utun table 2022
ip -6 route del default dev utun table 2022
ip -6 route add default dev utun table "$PROXY_ROUTE_TABLE"
ip -6 rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
ip route add default dev utun table "$PROXY_ROUTE_TABLE"
ip rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
else
reg4='^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'
while ( [ -n "$(pidof clash)" ] && [ "$CORE_HTTP_CODE" != "200" ] && [ "$TUN_WAIT" -le 120 ] && [ -n "$(echo ${lan_ip} | grep -Eo ${reg4})" ] )
do
CORE_HTTP_CODE=$(curl -m 5 -o /dev/null -s -w '%{http_code}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${da_password}" -XGET http://${lan_ip}:${cn_port}/group)
let TUN_WAIT++
sleep 1
done
if [ -z "$(echo ${lan_ip} | grep -Eo ${reg4})" ]; then
LOG_OUT "Error: LAN IP Address Get Error, Please Check The LAN Interface Setting or Choose the Correct Interface in the Setting!"
fi
if [ "$CORE_HTTP_CODE" != "200" ]; then
LOG_OUT "Error: Core Status Abnormal, Please Check The Log Infos!"
start_fail
fi
fi
if [ -z "$(pidof clash)" ]; then
LOG_OUT "Error: Core Start Failed, Please Check The Log Infos!"
start_fail
fi
# redirect dns setting after core started, prevent core dns lookup failure
change_dns "$enable_redirect_dns"
set_firewall
if [ "$1" == "start" ]; then
LOG_OUT "Tip: OpenClash Start Successful!"
else
LOG_OUT "Tip: Firewall Reload Successful!"
fi
} >/dev/null 2>&1
start_run_core()
{
ulimit -SHn 1000000
ulimit -v unlimited
ulimit -u unlimited
modprobe tun
if ! $quick_start; then
mv "$TMP_CONFIG_FILE" "$CONFIG_FILE"
rm -rf "$TMP_CONFIG_FILE"
@@ -741,81 +846,6 @@ upnp_exclude()
fi
} >/dev/null 2>&1
check_core_status()
{
TUN_WAIT=0
TUN_RESTART=1
CORE_HTTP_CODE=0
if [ -z "$(pidof clash)" ]; then
sleep 5
fi
if [ -n "$en_mode_tun" ] || [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
if [ -n "$en_mode_tun" ]; then
ip_="ip"
else
ip_="ip -6"
fi
#wait 120s most for tun interface start
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -le 120 ] )
do
$ip_ link set utun up
let TUN_WAIT++
sleep 1
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_WAIT" -gt 120 ]; then
while ( [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -le 3 ] )
do
LOG_OUT "Warning: TUN Interface Start Failed, Try to Restart Again..."
kill_clash
start_run_core
sleep 120
let TUN_RESTART++
done
if [ -n "$(pidof clash)" ] && [ -z "$($ip_ route list |grep utun)" ] && [ "$TUN_RESTART" -gt 3 ]; then
LOG_OUT "Warning: TUN Interface Start Failed, Please Check The Dependence or Try to Restart Again!"
start_fail
fi
fi
if [ -n "$(pidof clash)" ]; then
if [ "$ipv6_mode" -eq 2 ] || [ "$ipv6_mode" -eq 3 ]; then
ip -6 rule del oif utun table 2022
ip -6 route del default dev utun table 2022
ip -6 route add default dev utun table "$PROXY_ROUTE_TABLE"
ip -6 rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
ip route add default dev utun table "$PROXY_ROUTE_TABLE"
ip rule add fwmark "$PROXY_FWMARK" ipproto icmp table main pref 1888
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 1889
fi
else
reg4='^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'
while ( [ -n "$(pidof clash)" ] && [ "$CORE_HTTP_CODE" != "200" ] && [ "$TUN_WAIT" -le 120 ] && [ -n "$(echo ${lan_ip} | grep -Eo ${reg4})" ] )
do
CORE_HTTP_CODE=$(curl -m 5 -o /dev/null -s -w '%{http_code}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${da_password}" -XGET http://${lan_ip}:${cn_port}/group)
let TUN_WAIT++
sleep 1
done
if [ -z "$(echo ${lan_ip} | grep -Eo ${reg4})" ]; then
LOG_OUT "Error: LAN IP Address Get Error, Please Check The LAN Interface Setting or Choose the Correct Interface in the Setting!"
fi
if [ "$CORE_HTTP_CODE" != "200" ]; then
LOG_OUT "Error: Core Status Abnormal, Please Check The Log Infos!"
start_fail
fi
fi
if [ -z "$(pidof clash)" ]; then
LOG_OUT "Error: Core Start Failed, Please Check The Log Infos!"
start_fail
fi
} >/dev/null 2>&1
firewall_lan_ac_traffic()
{
local src_port src_ip proto target enabled family dscp comment
@@ -1369,6 +1399,7 @@ if [ -n "$FW4" ]; then
CHNROUTE_WAIT=0
while ( [ -z "$(nft list sets |grep "set china_ip_route {")" ] && [ "$CHNROUTE_WAIT" -le 3 ] )
do
sleep 3
nft -f '/etc/openclash/china_ip_route.ipset'
let CHNROUTE_WAIT++
done
@@ -1575,7 +1606,7 @@ if [ -n "$FW4" ]; then
if [ -z "$en_mode_tun" ]; then
#udp
if [ "$enable_udp_proxy" -eq 1 ]; then
modprobe nft_tproxy
check_mod "nft_tproxy"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
nft 'add chain inet fw4 openclash_mangle'
@@ -1616,7 +1647,7 @@ if [ -n "$FW4" ]; then
nft 'add rule inet fw4 mangle_prerouting meta nfproto {ipv4} ip protocol udp counter jump openclash_mangle'
fi
if [ "$enable_udp_proxy" -ne 1 ] && [ "$en_mode" = "fake-ip" ]; then
modprobe nft_tproxy
check_mod "nft_tproxy"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
nft 'add chain inet fw4 openclash_mangle'
@@ -1795,6 +1826,7 @@ if [ -n "$FW4" ]; then
CHNROUTE_WAIT=0
while ( [ -z "$(nft list sets |grep "set china_ip6_route {")" ] && [ "$CHNROUTE_WAIT" -le 3 ] )
do
sleep 3
nft -f '/etc/openclash/china_ip6_route.ipset'
let CHNROUTE_WAIT++
done
@@ -2030,7 +2062,7 @@ if [ -n "$FW4" ]; then
#route
if [ "$ipv6_mode" -ne 2 ] && [ "$ipv6_mode" -ne 3 ]; then
if [ "$enable_v6_udp_proxy" -eq 1 ] || [ "$ipv6_mode" -eq 0 ]; then
modprobe nft_tproxy
check_mod "nft_tproxy"
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip -6 route add local ::/0 dev lo table "$PROXY_ROUTE_TABLE"
fi
@@ -2329,7 +2361,7 @@ if [ -z "$FW4" ]; then
if [ -z "$en_mode_tun" ]; then
#udp
if [ "$enable_udp_proxy" -eq 1 ]; then
modprobe xt_TPROXY
check_mod "xt_TPROXY"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
iptables -t mangle -N openclash
@@ -2369,7 +2401,7 @@ if [ -z "$FW4" ]; then
fi
if [ "$enable_udp_proxy" -ne 1 ] && [ "$en_mode" = "fake-ip" ]; then
modprobe xt_TPROXY
check_mod "xt_TPROXY"
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
iptables -t mangle -N openclash
@@ -2784,7 +2816,7 @@ if [ -z "$FW4" ]; then
#route
if [ "$ipv6_mode" -ne 2 ] && [ "$ipv6_mode" -ne 3 ]; then
if [ "$enable_v6_udp_proxy" -eq 1 ] || [ "$ipv6_mode" -eq 0 ]; then
modprobe xt_TPROXY
check_mod "xt_TPROXY"
ip -6 rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip -6 route add local ::/0 dev lo table "$PROXY_ROUTE_TABLE"
fi
@@ -3078,6 +3110,7 @@ EOF
SMART_COLLECT:int_bool \
SMART_COLLECT_SIZE:int \
SMART_COLLECT_RATE:string \
SMART_PREFER_ASN:int_bool \
LGBM_AUTO_UPDATE:int_bool \
LGBM_UPDATE_INTERVAL:int \
LGBM_CUSTOM_URL:string \
@@ -3442,6 +3475,7 @@ get_config()
smart_strategy=$(uci_get_config "smart_strategy" || echo 0)
smart_policy_priority=$(uci_get_config "smart_policy_priority" || echo 0)
smart_enable_lgbm=$(uci_get_config "smart_enable_lgbm" || echo 0)
smart_prefer_asn=$(uci_get_config "smart_prefer_asn" || echo 0)
[ -z "$dns_port" ] && dns_port=7874 && uci -q set openclash.config.dns_port=7874
uci -q commit openclash
@@ -3452,7 +3486,7 @@ start_service()
enable=$(uci_get_config "enable")
[ "$enable" != "1" ] && LOG_OUT "Warning: OpenClash Now Disabled, Need Start From Luci Page, Exit..." && SLOG_CLEAN && exit 0
LOG_OUT "OpenClash Start Running..."
LOG_OUT "Tip: OpenClash Start Running..."
{
LOG_OUT "Step 1: Get The Configuration..."
@@ -3480,7 +3514,7 @@ start_service()
/usr/share/openclash/yml_rules_change.sh \
"$rule_source" "$enable_custom_clash_rules" "$TMP_CONFIG_FILE"\
"$enable_rule_proxy" "$CONFIG_NAME" "$router_self_proxy" "$lan_ip" "$enable_redirect_dns" "$en_mode"\
"$auto_smart_switch" "$smart_collect" "$smart_collect_rate" "$smart_strategy" "$smart_policy_priority" "$smart_enable_lgbm"
"$auto_smart_switch" "$smart_collect" "$smart_collect_rate" "$smart_strategy" "$smart_policy_priority" "$smart_enable_lgbm" "$smart_prefer_asn"
#Custom overwrite
if [ -f "/tmp/yaml_overwrite.sh" ]; then
@@ -3522,24 +3556,16 @@ start_service()
LOG_OUT "Step 4: Start Running The Clash Core..."
start_run_core
LOG_OUT "Step 5: Set Dnsmasq..."
change_dns "$enable_redirect_dns"
LOG_OUT "Step 6: Set Firewall Rules..."
set_firewall
check_core_status &
LOG_OUT "Step 7: Add Cron Rules, Start Daemons..."
LOG_OUT "Step 5: Add Cron Rules, Start Daemons..."
add_cron
if [ -z "$(uci -q get dhcp.lan.dhcpv6)" ] || [ "$(uci -q get dhcp.lan.dhcpv6)" == "disabled" ]; then
LOG_OUT "OpenClash Start Successful!"
elif [ "$ipv6_enable" -eq 0 ]; then
LOG_OUT "Warning: OpenClash Start Successful, Please Note That Network May Abnormal With IPv6's DHCP Server"
else
LOG_OUT "OpenClash Start Successful!"
LOG_OUT "Step 6: Core Status Checking and Firewall Rules Setting..."
check_core_status "start" &
if [ "$ipv6_enable" -eq 0 ] && [ "$(uci -q get dhcp.lan.dhcpv6)" != "disabled" ] && [ -n "$(uci -q get dhcp.lan.dhcpv6)" ]; then
LOG_OUT "Warning: Please Note That Network May Abnormal With IPv6's DHCP Server"
fi
write_run_quick
SLOG_CLEAN
rm -rf /tmp/yaml_*
@@ -3552,7 +3578,7 @@ stop_service()
{
enable=$(uci_get_config "enable")
LOG_OUT "OpenClash Stoping..."
LOG_OUT "Tip: OpenClash Stoping..."
LOG_OUT "Step 1: Backup The Current Groups State..."
{
@@ -3594,12 +3620,10 @@ stop_service()
${DNSMASQ_CONF_DIR}/dnsmasq_openclash_chnroute_pass.conf \
${DNSMASQ_CONF_DIR}/dnsmasq_openclash_chnroute6_pass.conf \
${DNSMASQ_CONF_DIR}/dnsmasq_openclash_custom_domain.conf
LOG_OUT "OpenClash Already Stop!"
else
LOG_OUT "OpenClash Already Stop!"
fi
LOG_OUT "Tip: OpenClash Already Stop!"
del_cron
clear_overwrite_set
rm -rf /tmp/yaml_*
@@ -3628,7 +3652,7 @@ revert_dnsmasq()
restart()
{
echo "OpenClash Restart..."
LOG_OUT "OpenClash Restart..."
LOG_OUT "Tip: OpenClash Restart..."
check_run_quick
stop
start
@@ -3669,18 +3693,18 @@ reload_service()
fi
LOG_OUT "【${CUR_RELOAD_NUM}/$MAX_RELOAD】Reload OpenClash Firewall Rules..."
revert_firewall
revert_dnsmasq
do_run_mode
get_config
set_firewall
check_core_status &
SLOG_CLEAN
fi
if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "manual" ]; then
LOG_OUT "Manually Reload Firewall Rules..."
revert_firewall
revert_dnsmasq
do_run_mode
get_config
set_firewall
check_core_status &
SLOG_CLEAN
fi
@@ -3692,20 +3716,9 @@ reload_service()
if pidof clash >/dev/null && [ "$enable" == "1" ] && [ "$1" == "restore" ]; then
do_run_mode
get_config
change_dns "$enable_redirect_dns"
set_firewall
check_core_status &
SLOG_CLEAN
fi
if [ "$enable" == "1" ] && [ "$1" == "core" ]; then
check_run_quick
do_run_mode
get_config
start_run_core
check_core_status
write_run_quick
SLOG_CLEAN
fi
} >/dev/null 2>&1
boot()
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -47,7 +47,7 @@ Google,ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,Google.
GoogleCN,ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,GoogleCN.yaml
GoogleFCM,ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,GoogleFCM.yaml
HBO(By ACL4SSR),ACL4SSR,classical,ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/,HBO.yaml,HBO-ACL4SSR.yaml
HBO MAX(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,MAX.yaml,MAX-lhie1.yaml
HBO MAX(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Max.yaml,MAX-lhie1.yaml
Hulu Japan,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Hulu Japan.yaml
Hulu(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,Hulu.yaml,Hulu-lhie1.yaml
JOOX(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,JOOX.yaml,JOOX-lhie1.yaml
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as t,bC as r}from"./index-Csmv4Fkv.js";const o=({children:e})=>t(r,{get children(){return[e," - MetaCubeXD"]}});export{o as D};
@@ -0,0 +1,6 @@
import{N as o}from"./index-Csmv4Fkv.js";/**
* @license @tabler/icons-solidjs v3.26.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var e=o("outline","reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"}],["path",{d:"M20 4v5h-5"}]]);export{e as I};
@@ -0,0 +1 @@
import{u as O,d as e,ab as V,i as t,ac as I,ad as q,F as x,ae as H,af as Z,ag as d,ah as Q,ai as X,g as C,aj as W,ak as Y,al as J,Q as K,t as h,b as U,y as ee,A as z,am as te,T as re,Y as F,D as ae,B as j,a0 as le,_ as A,a1 as se,Z as G,a7 as ne,a9 as ie,l as oe}from"./index-Csmv4Fkv.js";import{c as ce,I as de,a as ue,f as P,b as ge,d as he,g as ve,e as me,j as fe,r as be}from"./index-CBBLUqwt.js";import{D as pe}from"./DocumentTitle-DG90V81t.js";var _e=h('<div class="flex flex-col gap-4"><div><select class="select select-bordered w-full"></select></div><div><select class="select select-bordered w-full"></select></div><div><select class="select select-bordered w-full">'),k=h("<option>");const $e=v=>{const[l]=O();return e(K,{ref:n=>{var o;return(o=v.ref)==null?void 0:o.call(v,n)},get icon(){return e(V,{size:24})},get title(){return l("logsSettings")},get children(){var n=_e(),o=n.firstChild,c=o.firstChild,_=o.nextSibling,f=_.firstChild,w=_.nextSibling,b=w.firstChild;return t(o,e(I,{withDivider:!0,get children(){return l("tableSize")}}),c),c.addEventListener("change",r=>q(r.target.value)),t(c,e(x,{get each(){return Object.values(H)},children:r=>(()=>{var s=k();return s.value=r,t(s,()=>l(r)),s})()})),t(_,e(I,{withDivider:!0,get children(){return l("logLevel")}}),f),f.addEventListener("change",r=>Z(r.target.value)),t(f,e(x,{get each(){return[d.Info,d.Error,d.Warning,d.Debug,d.Silent]},children:r=>(()=>{var s=k();return s.value=r,t(s,()=>l(r)),s})()})),t(w,e(I,{withDivider:!0,get children(){return l("logMaxRows")}}),b),b.addEventListener("change",r=>Q(parseInt(r.target.value))),t(b,e(x,{each:X,children:r=>(()=>{var s=k();return s.value=r,t(s,r),s})()})),C(()=>c.value=W()),C(()=>f.value=Y()),C(()=>b.value=J()),n}})};var Se=h("<span>"),xe=h('<div class="flex h-full flex-col gap-2"><div class="join w-full"><input type=search class="input input-sm join-item input-primary flex-1 flex-shrink-0"></div><div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300"><table><thead class="sticky top-0 z-10"></thead><tbody>'),Ce=h("<tr>"),we=h('<th class=bg-base-200><div class="flex items-center"><div>'),ye=h('<tr class="hover:!bg-primary hover:text-primary-content">'),Le=h("<td class=py-2>");const N=(v,l,n,o)=>{const c=be(v.getValue(l),n);return o({itemRank:c}),c.passed},Me=()=>{const v=U();if(!ee())return v("/setup",{replace:!0}),null;let l;const[n]=O(),[o,c]=z(""),{logs:_,paused:f,setPaused:w}=te(),[b,r]=re(z([]),{name:"logsTableSorting",storage:localStorage}),s=[{header:n("sequence"),accessorFn:i=>i.seq},{header:n("type"),accessorFn:i=>i.type,cell:({row:i})=>{const p=i.original.type;let u="";switch(p){case d.Error:u="text-error";break;case d.Warning:u="text-warning";break;case d.Info:u="text-info";break;case d.Debug:u="text-success";break}return(()=>{var $=Se();return F($,u),t($,()=>`[${i.original.type}]`),$})()}},{header:n("payload"),accessorFn:i=>i.payload}],M=ce({filterFns:{fuzzy:N},state:{get globalFilter(){return o()},get sorting(){return b()}},get data(){return _()},sortDescFirst:!0,columns:s,onGlobalFilterChange:c,onSortingChange:r,globalFilterFn:N,getFilteredRowModel:ve(),getSortedRowModel:me(),getCoreRowModel:fe()});return[e(pe,{get children(){return n("logs")}}),(()=>{var i=xe(),p=i.firstChild,u=p.firstChild,$=p.nextSibling,D=$.firstChild,R=D.firstChild,B=R.nextSibling;return u.$$input=a=>c(a.target.value),t(p,e(j,{class:"btn-primary join-item btn-sm",onClick:()=>w(a=>!a),get icon(){return ae(()=>!!f())()?e(de,{}):e(ue,{})}}),null),t(p,e(j,{class:"btn-primary join-item btn-sm",onClick:()=>l==null?void 0:l.showModal(),get icon(){return e(le,{})}}),null),t(R,e(A,{get each(){return M.getHeaderGroups()},children:a=>{const m=a();return(()=>{var g=Ce();return t(g,e(A,{get each(){return m.headers},children:y=>{const S=y();return(()=>{var E=we(),T=E.firstChild,L=T.firstChild;return se(L,"click",S.column.getToggleSortingHandler(),!0),t(L,()=>P(S.column.columnDef.header,S.getContext())),t(T,()=>({asc:e(ge,{}),desc:e(he,{})})[S.column.getIsSorted()]??null,null),C(()=>F(L,G(S.column.getCanSort()&&"cursor-pointer select-none","flex-1"))),E})()}})),g})()}})),t(B,e(x,{get each(){return M.getRowModel().rows},children:a=>(()=>{var m=ye();return t(m,e(x,{get each(){return a.getVisibleCells()},children:g=>(()=>{var y=Le();return t(y,()=>P(g.column.columnDef.cell,g.getContext())),y})()})),m})()})),t(i,e($e,{ref:a=>l=a}),null),C(a=>{var m=n("search"),g=G(ne(W()),"table relative rounded-none");return m!==a.e&&ie(u,"placeholder",a.e=m),g!==a.t&&F(D,a.t=g),a},{e:void 0,t:void 0}),i})()]};oe(["input","click"]);export{Me as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{u as B,a as T,b as q,c as z,o as H,e as h,d,f as M,i as o,g as N,S as X,B as S,I as G,F as J,t as x,z as b,h as U,s as w,j as K,k as C,l as O,m as Q,v as W,n as Y}from"./index-Csmv4Fkv.js";import{D as Z}from"./DocumentTitle-DG90V81t.js";const l=[];for(let t=0;t<256;++t)l.push((t+256).toString(16).slice(1));function tt(t,n=0){return(l[t[n+0]]+l[t[n+1]]+l[t[n+2]]+l[t[n+3]]+"-"+l[t[n+4]]+l[t[n+5]]+"-"+l[t[n+6]]+l[t[n+7]]+"-"+l[t[n+8]]+l[t[n+9]]+"-"+l[t[n+10]]+l[t[n+11]]+l[t[n+12]]+l[t[n+13]]+l[t[n+14]]+l[t[n+15]]).toLowerCase()}let v;const et=new Uint8Array(16);function nt(){if(!v){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");v=crypto.getRandomValues.bind(crypto)}return v(et)}const st=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),E={randomUUID:st};function lt(t,n,y){if(E.randomUUID&&!n&&!t)return E.randomUUID();t=t||{};const r=t.random||(t.rng||nt)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,tt(r)}var it=x("<option>"),at=x('<div class="mx-auto flex max-w-screen-sm flex-col items-center gap-4 py-10"><form class=contents><div class="flex w-full flex-col gap-4"><div class=flex-1><label class=label><span class=label-text></span></label><input name=url type=url class="input input-bordered w-full"placeholder=http(s)://{hostname}:{port} list=defaultEndpoints><datalist id=defaultEndpoints><option value=http://127.0.0.1:9090></option></datalist></div><div class=flex-1><label class=label><span class=label-text></span></label><input name=secret type=password class="input input-bordered w-full"placeholder=secret></div></div></form><div class="grid w-full grid-cols-2 gap-4">'),rt=x('<div class="badge badge-info flex w-full cursor-pointer items-center justify-between gap-4 py-4"><span class=truncate>');const ot=b.object({url:b.string().min(1),secret:b.string()}),ut=()=>{const[t]=B(),n=T(),y=q(),r=s=>{C(s),y("/overview",{replace:!0})},R=async s=>{const e=h().find(i=>i.id===s);e&&await U(e.url,e.secret)&&r(s)},g=async({url:s,secret:e})=>{const i=Q(s);if(!await U(i,e))return;const a=lt(),c=h().slice(),u=c.find(f=>f.url===i);if(!u){w([{id:a,url:i,secret:e},...c]),r(a);return}u.secret=e,u.id=a,w(c),r(a)},I=s=>{const{message:e}=s;Y.error(e)},{form:$}=z({extend:W({schema:ot}),onSubmit:g,onError:I}),L=s=>{K()===s&&C(""),w(h().filter(e=>e.id!==s))};return H(async()=>{var i,a;const s=n.search||window.location.search||((a=(i=n.hash.match(/\?.*$/))==null?void 0:i[0])==null?void 0:a.replace("?",""));if(!s)return;const e=new URLSearchParams(s);e.has("hostname")?await g({url:`${e.get("http")?"http:":e.get("https")?"https:":window.location.protocol}//${e.get("hostname")}${e.get("port")?`:${e.get("port")}`:""}`,secret:e.get("secret")??""}):h().length===0&&await g({url:"http://127.0.0.1:9090",secret:""})}),[d(Z,{get children(){return t("setup")}}),(()=>{var s=at(),e=s.firstChild,i=e.firstChild,a=i.firstChild,c=a.firstChild,u=c.firstChild,f=c.nextSibling,_=f.nextSibling;_.firstChild;var D=a.nextSibling,k=D.firstChild,j=k.firstChild,V=e.nextSibling;return M($,e,()=>$),o(u,()=>t("endpointURL")),o(_,d(X,{get when(){return window.location.origin!=="http://127.0.0.1:9090"},get children(){var p=it();return N(()=>p.value=window.location.origin),p}}),null),o(j,()=>t("secret")),o(i,d(S,{type:"submit",class:"btn-primary uppercase",get children(){return t("add")}}),null),o(V,d(J,{get each(){return h()},children:({id:p,url:F})=>(()=>{var m=rt(),P=m.firstChild;return m.$$click=()=>R(p),o(P,F),o(m,d(S,{class:"btn-circle btn-ghost btn-xs text-white",onClick:A=>{A.stopPropagation(),L(p)},get children(){return d(G,{})}}),null),m})()})),s})()]};O(["click"]);export{ut as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{W as a,b4 as m}from"./index-Csmv4Fkv.js";const s=o=>a(o).locale(m()).fromNow();export{s as f};
@@ -9,8 +9,8 @@
<meta name="theme-color" content="#000000" />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<link rel="apple-touch-icon" href="./pwa-192x192.png" />
<script type="module" crossorigin src="./assets/index-DIwJcTz_.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BaCG7ya-.css">
<script type="module" crossorigin src="./assets/index-Csmv4Fkv.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-M06kPDrB.css">
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
<body>

Some files were not shown because too many files have changed in this diff Show More