Skip to content

Commit 5fa0895

Browse files
committed
Merge branch 'dev'
2 parents 2d9f77a + 0ff1027 commit 5fa0895

36 files changed

+10377
-4124
lines changed

.github/workflows/compile_new_ipk.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,67 @@ jobs:
9191
mkdir -p tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash
9292
cp -rf ./luci-app-openclash/. tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/
9393
94+
- name: Copy OpenClash Source Codes
95+
run: |
96+
mkdir -p tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash
97+
cp -rf ./luci-app-openclash/. tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/
98+
99+
- name: Update Third-Party Resources
100+
run: |
101+
CHNR_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/china_ip_route.ipset
102+
CHNR6_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/china_ip6_route.ipset
103+
YACD_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/usr/share/openclash/ui/yacd
104+
ZASHBOARD_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/usr/share/openclash/ui/zashboard
105+
METACUBEXD_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/usr/share/openclash/ui/metacubexd
106+
GEOSITE_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/GeoSite.dat
107+
COUNTRY_MMDB_PATH=tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/root/etc/openclash/Country.mmdb
108+
109+
# 更新 China IP Route
110+
mkdir -p tmp
111+
curl -sSL https://ispip.clang.cn/all_cn.txt -o tmp/china_ip_route.ipset
112+
mkdir -p $(dirname $CHNR_PATH)
113+
cp tmp/china_ip_route.ipset $CHNR_PATH
114+
curl -sSL https://ispip.clang.cn/all_cn_ipv6.txt -o tmp/china_ip6_route.ipset
115+
mkdir -p $(dirname $CHNR6_PATH)
116+
cp tmp/china_ip6_route.ipset $CHNR6_PATH
117+
118+
# 更新 MetaCubeXD UI
119+
mkdir -p tmp/metacubexd_zip
120+
curl -sSL https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip -o tmp/metacubexd.zip
121+
unzip -q -o tmp/metacubexd.zip -d tmp/metacubexd_zip
122+
METACUBEXD_UNZIP_PATH="tmp/metacubexd_zip/metacubexd-gh-pages"
123+
mkdir -p "$METACUBEXD_PATH"
124+
rm -rf "$METACUBEXD_PATH"/*
125+
cp -rf "$METACUBEXD_UNZIP_PATH"/* "$METACUBEXD_PATH"
126+
127+
# 更新 Yacd UI
128+
mkdir -p tmp/yacd_zip
129+
curl -sSL https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip -o tmp/yacd.zip
130+
unzip -q -o tmp/yacd.zip -d tmp/yacd_zip
131+
YACD_UNZIP_PATH="tmp/yacd_zip/Yacd-meta-gh-pages"
132+
mkdir -p "$YACD_PATH"
133+
rm -rf "$YACD_PATH"/*
134+
cp -rf "$YACD_UNZIP_PATH"/* "$YACD_PATH"
135+
136+
# 更新 ZashBoard UI
137+
mkdir -p tmp/zashboard_zip
138+
curl -sSL https://github.com/Zephyruso/zashboard/releases/latest/download/dist-cdn-fonts.zip -o tmp/zashboard.zip
139+
unzip -q -o tmp/zashboard.zip -d tmp/zashboard_zip
140+
mkdir -p "$ZASHBOARD_PATH"
141+
rm -rf "$ZASHBOARD_PATH"/*
142+
cp -rf tmp/zashboard_zip/dist/* "$ZASHBOARD_PATH"
143+
144+
# 更新 GeoSite.dat
145+
RULES_RELEASE=$(curl -s https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/latest | jq -r '.tag_name')
146+
curl -sSL "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/${RULES_RELEASE}/geosite.dat" -o tmp/GeoSite.dat
147+
mkdir -p $(dirname "$GEOSITE_PATH")
148+
cp tmp/GeoSite.dat "$GEOSITE_PATH"
149+
150+
# 更新 Country.mmdb
151+
curl -sSL "https://github.com/alecthw/mmdb_china_ip_list/releases/latest/download/Country-lite.mmdb" -o tmp/Country.mmdb
152+
mkdir -p $(dirname "$COUNTRY_MMDB_PATH")
153+
cp tmp/Country.mmdb "$COUNTRY_MMDB_PATH"
154+
94155
- name: Compile po2lmo
95156
run: |
96157
cd tmp/${{ matrix.target.sdk_dir }}/package/luci-app-openclash/tools/po2lmo

luci-app-openclash/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include $(TOPDIR)/rules.mk
22

33
PKG_NAME:=luci-app-openclash
4-
PKG_VERSION:=0.47.015
4+
PKG_VERSION:=0.47.022
55
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
66

77
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

luci-app-openclash/luasrc/controller/openclash.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4013,7 +4013,7 @@ function action_overwrite_subscribe_info()
40134013
end
40144014
uci:set("openclash", s[".name"], "order", order)
40154015
else
4016-
uci:set("openclash", s[".name"], "order", tonumber(order))
4016+
uci:set("openclash", s[".name"], "order", tonumber(order) or 1)
40174017
end
40184018
if s.enable == nil or (s.enable ~= nil and enable ~= nil) then
40194019
if enable == nil then

luci-app-openclash/luasrc/model/cbi/openclash/config-overwrite.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ o.default = ""
388388
o.placeholder = "Premium:0.9;SG:1.3"
389389
o.description = translate("Nodes Weight Priority, <1 Means Lower Priority, >1 Means Higher Priority, The Default is 1, Pattern Support Regex and String")
390390

391+
o = s:taboption("smart", Flag, "smart_prefer_asn", font_red..bold_on..translate("Prefer-ASN")..bold_off..font_off)
392+
o.description = translate("Select Nodes Force Lookup and Use Target ASN Info First For More Stable Experience")
393+
o.default = 0
394+
391395
o = s:taboption("smart", Flag, "smart_enable_lgbm", font_red..bold_on..translate("Enable LightGBM Model")..bold_off..font_off)
392396
o.description = font_red..bold_on..translate("Use LightGBM Model To Predict Weight")..bold_off..font_off
393397
o.default = 0

luci-app-openclash/luasrc/view/openclash/config_edit.htm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,6 +2680,8 @@
26802680
} else {
26812681
formData.append('enable', '0');
26822682
}
2683+
formData.append('order', sub.order || 1);
2684+
26832685
var progressContainer = form.querySelector('#overwrite-upload-progress');
26842686
var progressFill = form.querySelector('#overwrite-progress-fill');
26852687
var progressText = form.querySelector('#overwrite-progress-text');

luci-app-openclash/luasrc/view/openclash/tblsection.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595

9696
#tab-header-<%=self.config%>-<%=self.sectiontype%> ul li{
9797
flex: 1 1 0;
98-
min-width: 0;
98+
min-width: 120px;
9999
width: 0;
100100
display: flex;
101101
align-items: center;

luci-app-openclash/luasrc/view/openclash/tblsection_dns.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
#tab-header-<%=self.config%>-<%=self.sectiontype%> ul li{
7171
flex: 1 1 0;
72-
min-width: 0;
72+
min-width: 120px;
7373
width: 0;
7474
display: flex;
7575
align-items: center;

luci-app-openclash/po/zh-cn/openclash.zh-cn.po

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,11 +2022,11 @@ msgstr "错误:OpenClash 启动失败,请到日志页面查看详细错误
20222022
msgid "Found 53 Port Hijacked, Clean Up Firewall Rules..."
20232023
msgstr "发现 53 端口被劫持,清理防火墙规则..."
20242024

2025-
msgid "OpenClash Start Running..."
2026-
msgstr "OpenClash 开始启动..."
2025+
msgid "Tip: OpenClash Start Running..."
2026+
msgstr "提示:OpenClash 开始启动..."
20272027

2028-
msgid "OpenClash Restart..."
2029-
msgstr "OpenClash 重新启动中..."
2028+
msgid "Tip: OpenClash Restart..."
2029+
msgstr "提示:OpenClash 重新启动中..."
20302030

20312031
msgid "Step 1: Get The Configuration..."
20322032
msgstr "第一步: 获取配置..."
@@ -2043,23 +2043,23 @@ msgstr "第三步: 快速启动模式,跳过修改配置文件..."
20432043
msgid "Step 4: Start Running The Clash Core..."
20442044
msgstr "第四步: 启动主程序..."
20452045

2046-
msgid "Step 5: Set Dnsmasq..."
2047-
msgstr "第五步: 设置 Dnsmasq 程序..."
2046+
msgid "Step 5: Add Cron Rules, Start Daemons..."
2047+
msgstr "第五步: 添加计划任务,启动进程守护程序..."
20482048

2049-
msgid "Step 6: Set Firewall Rules..."
2050-
msgstr "第六步: 设置防火墙规则..."
2049+
msgid "Step 6: Core Status Checking and Firewall Rules Setting..."
2050+
msgstr "第六步: 内核状态检查及防火墙规则设置..."
20512051

2052-
msgid "Step 7: Add Cron Rules, Start Daemons..."
2053-
msgstr "第七步: 添加计划任务,启动进程守护程序..."
2052+
msgid "Tip: OpenClash Start Successful!"
2053+
msgstr "提示:OpenClash 启动成功,请等待服务器上线!"
20542054

2055-
msgid "OpenClash Start Successful!"
2056-
msgstr "OpenClash 启动成功,请等待服务器上线!"
2055+
msgid "Tip: Firewall Reload Successful!"
2056+
msgstr "提示:防火墙重置成功!"
20572057

2058-
msgid "Warning: OpenClash Start Successful, Please Note That Network May Abnormal With IPv6's DHCP Server"
2059-
msgstr "警告:OpenClash 启动成功,检测到您启用了 IPv6 的 DHCP 服务,可能会造成连接异常!"
2058+
msgid "Warning: Please Note That Network May Abnormal With IPv6's DHCP Server"
2059+
msgstr "警告:检测到您启用了 IPv6 的 DHCP 服务,可能会造成连接异常!"
20602060

2061-
msgid "OpenClash Stoping..."
2062-
msgstr "OpenClash 开始关闭..."
2061+
msgid "Tip: OpenClash Stoping..."
2062+
msgstr "提示:OpenClash 开始关闭..."
20632063

20642064
msgid "Step 1: Backup The Current Groups State..."
20652065
msgstr "第一步: 备份当前策略组状态..."
@@ -2079,8 +2079,8 @@ msgstr "第五步: 重启 Dnsmasq 程序..."
20792079
msgid "Step 6: Delete OpenClash Residue File..."
20802080
msgstr "第六步:删除 OpenClash 残留文件..."
20812081

2082-
msgid "OpenClash Already Stop!"
2083-
msgstr "OpenClash 关闭成功!"
2082+
msgid "Tip: OpenClash Already Stop!"
2083+
msgstr "提示:OpenClash 已关闭!"
20842084

20852085
msgid "Skip Reload OpenClash Firewall Rules Until 5 Minutes Later..."
20862086
msgstr "5 分钟内重置已超过限制次数,跳过本次 OpenClash 防火墙规则重置..."
@@ -4192,4 +4192,13 @@ msgid "Subscription"
41924192
msgstr "订阅"
41934193

41944194
msgid "Overwrite Module"
4195-
msgstr "覆写模块"
4195+
msgstr "覆写模块"
4196+
4197+
msgid "module not found, please check your system depends and try again!"
4198+
msgstr "模块未找到,请检查你的固件依赖并重试!"
4199+
4200+
msgid "Select Nodes Force Lookup and Use Target ASN Info First For More Stable Experience"
4201+
msgstr "选择节点时强制查找并优先使用目标的 ASN 信息,以获得更稳定的体验"
4202+
4203+
msgid "Prefer-ASN"
4204+
msgstr "ASN 优先"

luci-app-openclash/root/etc/config/openclash

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,10 @@ config dns_servers
291291

292292
config config_overwrite
293293
option name 'default'
294-
option type 'file'
295-
option param 'EN_KEY1=URL1;EN_KEY12=URL2;EN_KEY13=URL3'
296-
option order '0'
297294
option enable '0'
295+
option url 'https://raw.githubusercontent.com/vernesong/OpenClash/refs/heads/dev/luci-app-openclash/root/etc/openclash/overwrite/default'
296+
option update_days 'off'
297+
option update_hour 'off'
298+
option type 'http'
299+
option order '1'
300+

0 commit comments

Comments
 (0)