Skip to content

Commit 8ebe09e

Browse files
committed
Merge branch 'dev'
2 parents c38cb9c + d8bcf91 commit 8ebe09e

File tree

16 files changed

+147
-124
lines changed

16 files changed

+147
-124
lines changed

.github/workflows/clear_cache.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222

2323
# https://github.com/marketplace/actions/git-changesets
2424
- id: changed_files

.github/workflows/compile_dev_core.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
sudo apt-get -y install git
2222
2323
- name: Clone OpenClash Repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
ref: core
2727

@@ -32,7 +32,7 @@ jobs:
3232
echo "current_id: $(sed -n 1p ./dev/core_version)"
3333
3434
- name: Clone Clash Repository
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
repository: Dreamacro/clash
3838
ref: dev
@@ -64,7 +64,7 @@ jobs:
6464
echo "upx=../upx-3.95-amd64_linux/upx" >> $GITHUB_ENV
6565
6666
- name: Clone OpenClash Repository
67-
uses: actions/checkout@v3
67+
uses: actions/checkout@v4
6868
with:
6969
ref: core
7070

@@ -82,7 +82,7 @@ jobs:
8282
check-latest: true
8383

8484
- name: Clone Clash Repository
85-
uses: actions/checkout@v3
85+
uses: actions/checkout@v4
8686
with:
8787
repository: Dreamacro/clash
8888
ref: dev
@@ -98,7 +98,7 @@ jobs:
9898
cp -rf "./bin/." "../tmp/bin/"
9999
100100
- name: Clone OpenClash Repository
101-
uses: actions/checkout@v3
101+
uses: actions/checkout@v4
102102
with:
103103
ref: core
104104

.github/workflows/compile_meta_core.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
sudo apt-get -y install git
2222
2323
- name: Clone OpenClash Repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
ref: core
2727

@@ -32,7 +32,7 @@ jobs:
3232
echo "current_id: $(sed -n 3p ./dev/core_version)"
3333
3434
- name: Clone Clash Meta Repository
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
repository: MetaCubeX/mihomo
3838
ref: Alpha
@@ -63,7 +63,7 @@ jobs:
6363
echo "upx=../upx-3.95-amd64_linux/upx" >> $GITHUB_ENV
6464
6565
- name: Clone OpenClash Repository
66-
uses: actions/checkout@v3
66+
uses: actions/checkout@v4
6767
with:
6868
ref: core
6969

@@ -81,7 +81,7 @@ jobs:
8181
check-latest: true
8282

8383
- name: Clone Clash Meta Repository
84-
uses: actions/checkout@v3
84+
uses: actions/checkout@v4
8585
with:
8686
repository: MetaCubeX/mihomo
8787
ref: Alpha
@@ -96,7 +96,7 @@ jobs:
9696
cp -rf "./bin/." "../tmp/bin/"
9797
9898
- name: Clone OpenClash Repository
99-
uses: actions/checkout@v3
99+
uses: actions/checkout@v4
100100
with:
101101
ref: core
102102

.github/workflows/compile_new_ipk.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
current_version: ${{ steps.current_version.outputs.version }}
1818
steps:
1919
- name: Clone Repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
ref: ${{ github.ref_name }}
2323

@@ -28,7 +28,7 @@ jobs:
2828
echo "New Version: $(grep 'PKG_VERSION:=' ./luci-app-openclash/Makefile |awk -F '=' '{print $2}')"
2929
3030
- name: Clone Repository
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232
with:
3333
ref: package
3434

@@ -44,7 +44,7 @@ jobs:
4444
if: ${{ needs.Get-Version.outputs.version != needs.Get-Version.outputs.current_version }}
4545
steps:
4646
- name: Clone OpenClash dev Repository
47-
uses: actions/checkout@v3
47+
uses: actions/checkout@v4
4848
with:
4949
ref: ${{ github.ref_name }}
5050

@@ -59,10 +59,10 @@ jobs:
5959
run: |
6060
cd ..
6161
mkdir tmp
62-
curl -SLk --connect-timeout 30 --retry 2 "https://archive.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2" -o "./tmp/SDK.tar.bz2"
62+
curl -SLk --connect-timeout 30 --retry 2 "https://archive.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2" -o "./tmp/SDK.tar.bz2"
6363
cd \tmp
6464
tar xjf SDK.tar.bz2
65-
mv "OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64" "SDK"
65+
mv "OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64" "SDK"
6666
6767
- name: Copy OpenClash Source Codes
6868
run: |
@@ -85,7 +85,7 @@ jobs:
8585
make package/luci-app-openclash/compile V=99
8686
8787
- name: Switch OpenClash Repository to Package
88-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8989
with:
9090
ref: package
9191

.github/workflows/compile_premium_core.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
sudo apt-get -y install curl git gzip
2222
2323
- name: Clone OpenClash Repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
ref: core
2727

@@ -63,7 +63,7 @@ jobs:
6363
echo "upx=../upx-3.95-amd64_linux/upx" >> $GITHUB_ENV
6464
6565
- name: Clone OpenClash Repository
66-
uses: actions/checkout@v3
66+
uses: actions/checkout@v4
6767
with:
6868
ref: core
6969

.github/workflows/master_release_sync.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
sudo apt-get -y install git
1818
1919
- name: Clone OpenClash Repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
ref: core
2323

@@ -39,7 +39,7 @@ jobs:
3939
fi
4040
4141
- name: Clone OpenClash Repository
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343
with:
4444
ref: package
4545

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@
6868
---
6969

7070

71-
从 OpenWrt 的 [SDK](https://archive.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2) 编译
71+
从 OpenWrt 的 [SDK](https://archive.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2) 编译
7272
```bash
7373
# 解压下载好的 SDK
74-
tar xjf OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
75-
cd OpenWrt-SDK-ar71xx-*
74+
curl -SLk --connect-timeout 30 --retry 2 "https://archive.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2" -o "/tmp/SDK.tar.bz2"
75+
cd \tmp
76+
tar xjf SDK.tar.bz2
77+
cd OpenWrt-SDK-15.05.1-*
7678

7779
# Clone 项目
7880
mkdir package/luci-app-openclash
@@ -96,7 +98,7 @@ cd ../..
9698
make package/luci-app-openclash/luci-app-openclash/compile V=99
9799

98100
# IPK文件位置
99-
./bin/ar71xx/packages/base/luci-app-openclash_0.39.7-beta_all.ipk
101+
./bin/ar71xx/packages/base/luci-app-openclash_*-beta_all.ipk
100102
```
101103

102104
```bash

luci-app-openclash/Makefile

+1-1
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.46.001
4+
PKG_VERSION:=0.46.003
55
PKG_RELEASE:=beta
66
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
77

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ function set_subinfo_url()
654654
end
655655

656656
function sub_info_get()
657-
local filepath, filename, sub_url, sub_info, info, upload, download, total, expire, http_code, len, percent, day_left, day_expire
657+
local filepath, filename, sub_url, sub_info, info, upload, download, total, expire, http_code, len, percent, day_left, day_expire, surplus, used
658658
local info_tb = {}
659659
filename = luci.http.formvalue("filename")
660660
sub_info = ""
@@ -705,14 +705,14 @@ function sub_info_get()
705705
else
706706
day_left = 0
707707
end
708-
709708
if used and total and used < total then
710709
percent = string.format("%.1f",((total-used)/total)*100) or nil
711710
elseif used == nil or total == nil or total == 0 then
712711
percent = 100
713712
else
714713
percent = 0
715714
end
715+
surplus = fs.filesize(total - used) or "null"
716716
total = fs.filesize(total) or "null"
717717
used = fs.filesize(used) or "null"
718718
sub_info = "Successful"
@@ -727,6 +727,7 @@ function sub_info_get()
727727
luci.http.write_json({
728728
http_code = http_code,
729729
sub_info = sub_info,
730+
surplus = surplus,
730731
used = used,
731732
total = total,
732733
percent = percent,
@@ -1071,7 +1072,8 @@ function action_status()
10711072
db_forward_ssl = db_foward_ssl(),
10721073
web = is_web(),
10731074
cn_port = cn_port(),
1074-
restricted_mode = restricted_mode();
1075+
restricted_mode = restricted_mode(),
1076+
core_type = uci:get("openclash", "config", "core_type") or "Dev";
10751077
})
10761078
end
10771079

luci-app-openclash/luasrc/model/cbi/openclash/settings.lua

+4
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ o = s:taboption("traffic_control", Flag, "disable_udp_quic", font_red..bold_on..
236236
o.description = translate("Prevent YouTube and Others To Use QUIC Transmission")..", "..font_red..bold_on..translate("REJECT UDP Traffic(Not Include CN) On Port 443")..bold_off..font_off
237237
o.default = 1
238238

239+
o = s:taboption("traffic_control", Flag, "skip_proxy_address", translate("Skip Proxy Address"))
240+
o.description = translate("Bypassing Server Addresses And Preventing Duplicate Proxies")
241+
o.default = 0
242+
239243
o = s:taboption("traffic_control", Value, "common_ports", font_red..bold_on..translate("Common Ports Proxy Mode")..bold_off..font_off)
240244
o.description = translate("Only Common Ports, Prevent BT/P2P Passing")
241245
o:value("0", translate("Disable"))

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@
252252
if ( x && x.status == 200 ) {
253253
if ( status.restricted_mode != "1" )
254254
{
255-
clash.innerHTML = status.clash ? '<b style=color:green><%:Running%></b>' : '<b style=color:red><%:Not Running%></b>';
255+
clash.innerHTML = status.clash ? '<b style=color:green>' + status.core_type +'&nbsp;&nbsp;&nbsp;<%:Running%></b>' : '<b style=color:red><%:Not Running%></b>';
256256
}
257257
else
258258
{
259-
clash.innerHTML = status.clash ? '<b style=color:green><%:Running%> <%:<Limited State>%></b>' : '<b style=color:red><%:Not Running%></b>';
259+
clash.innerHTML = status.clash ? '<b style=color:green>' + status.core_type +'&nbsp;&nbsp;&nbsp;<%:Running%>&nbsp;&nbsp;&nbsp;<%:<Limited State>%></b>' : '<b style=color:red><%:Not Running%></b>';
260260
}
261261
watchdog.innerHTML = status.watchdog ? '&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<%:Daemons%>:&nbsp;&nbsp;&nbsp;<b style=color:green><%:Running%></b>' : '&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<%:Daemons%>:&nbsp;&nbsp;&nbsp;<b style=color:red><%:Not Running%></b>';
262262
dase.innerHTML = status.dase ? "<b style=color:green>"+status.dase+"</b>" : "<b style=color:red>"+"<%:Not Set%>"+"</b>";

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272
retry_<%=idname%> = 0;
7373
localStorage.setItem("<%=filename%>",JSON.stringify(status));
7474
document.getElementById('<%=idname%>').className = "sub_tab_show";
75-
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((status.used), (status.total), (status.percent), false, false, (status.expire), (status.day_left));
76-
//document.getElementById('<%=idname%>').innerHTML = "<%:Plan Traffic%>" + ": " + "<span style=color:green>" + status.used + "</span> | <span style=color:green>" + status.total + "</span> <br/> <%:Plan Expiration Time%>: " + "<span style=color:green>" + status.expire + "</span>";
75+
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((status.surplus ? status.surplus : status.used), (status.total), (status.percent), false, false, (status.expire), (status.day_left));
7776
}
7877
else if ( x && x.status == 200 && status.sub_info == "No Sub Info Found" ) {
7978
retry_<%=idname%> = 0;
@@ -110,8 +109,7 @@
110109
document.getElementById('<%=idname%>').innerHTML = "<span><%:No Sub Info Found%></span>";
111110
}
112111
else {
113-
//document.getElementById('<%=idname%>').innerHTML = "<%:Plan Traffic%>" + ": " + "<span style=color:green>" + save_info.used + "</span> | <span style=color:green>" + save_info.total + "</span> <br/> <%:Plan Expiration Time%>: " + "<span style=color:green>" + save_info.expire + "</span>";
114-
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((save_info.used), (save_info.total), (save_info.percent ? save_info.percent : 0), false, false, (save_info.expire), (save_info.day_left ? save_info.day_left : 0));
112+
document.getElementById('<%=idname%>').innerHTML = progressbar_<%=idname%>((save_info.surplus ? save_info.surplus : save_info.used), (save_info.total), (save_info.percent ? save_info.percent : 0), false, false, (save_info.expire), (save_info.day_left ? save_info.day_left : 0));
115113
}
116114
}
117115
else {

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -3240,6 +3240,9 @@ msgstr "大陆域名 DNS 服务器"
32403240
msgid "Specify DNS Server For CN Domain Lists, Only One IP Server Address Support"
32413241
msgstr "指定大陆域名的 DNS 服务器,只支持填写一个IP地址"
32423242

3243+
msgid "Warning: Dnsmasq Work is Unnormal, Setting The Firewall DNS Hijacking Rules..."
3244+
msgstr "警告:检测到 Dnsmasq 工作异常,设置防火墙 DNS 劫持规则..."
3245+
32433246
msgid "Tip: Dnsmasq Work is Normal, Restore The Firewall DNS Hijacking Rules..."
32443247
msgstr "提示:检测到 Dnsmasq 正常工作,还原防火墙 DNS 劫持规则..."
32453248

@@ -3487,4 +3490,10 @@ msgid "Error: Set Fallback DNS Proxy Group Failed,"
34873490
msgstr "错误:Fallback DNS 代理策略组设置失败,"
34883491

34893492
msgid "To Use in Fake-IP Mode, Please Switch The Dns Redirect Mode To Firewall Forwarding"
3490-
msgstr "要在 Fake-IP 模式下使用,请将 Dns 重定向模式切换为防火墙转发模式"
3493+
msgstr "要在 Fake-IP 模式下使用,请将 Dns 重定向模式切换为防火墙转发模式"
3494+
3495+
msgid "Skip Proxy Address"
3496+
msgstr "绕过服务器地址"
3497+
3498+
msgid "Bypassing Server Addresses And Preventing Duplicate Proxies"
3499+
msgstr "绕过服务器地址,防止重复代理"

luci-app-openclash/root/etc/uci-defaults/luci-openclash

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ uci -q set network.utun=interface
213213
uci -q set network.utun.proto=none
214214
uci -q set network.utun.ifname=utun
215215
uci -q set network.utun.device=utun
216+
uci -q set network.utun.auto='0'
216217
uci -q commit network
217218

218219
config_load "firewall"

0 commit comments

Comments
 (0)