Skip to content

Commit f69b789

Browse files
luci-app-passwall: bump to 26.1.9
1 parent 768f24e commit f69b789

File tree

29 files changed

+481
-151
lines changed

29 files changed

+481
-151
lines changed

applications/luci-app-passwall/Makefile

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

88
PKG_NAME:=luci-app-passwall
9-
PKG_VERSION:=26.1.1
9+
PKG_VERSION:=26.1.9
1010
PKG_RELEASE:=1
1111

1212
PKG_CONFIG_DEPENDS:= \

applications/luci-app-passwall/luasrc/controller/passwall.lua

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,7 @@ function connect_status()
334334
local proxy_mode = uci:get(appname, "@global[0]", "tcp_proxy_mode") or "proxy"
335335
local localhost_proxy = uci:get(appname, "@global[0]", "localhost_proxy") or "1"
336336
local socks_server = (localhost_proxy == "0") and api.get_cache_var("GLOBAL_TCP_SOCKS_server") or ""
337-
338-
-- 兼容 curl 8.6 time_starttransfer 错误
339-
local curl_ver = api.get_bin_version_cache("/usr/bin/curl", "-V 2>/dev/null | head -n 1 | awk '{print $2}' | cut -d. -f1,2 | tr -d ' \n'") or "0"
340-
url = (curl_ver == "8.6") and "-w %{http_code}:%{time_appconnect} https://" .. url
341-
or "-w %{http_code}:%{time_starttransfer} http://" .. url
342-
337+
url = "-w %{http_code}:%{time_starttransfer} " .. url
343338
if socks_server and socks_server ~= "" then
344339
if (chn_list == "proxy" and gfw_list == "0" and proxy_mode ~= "proxy" and baidu ~= nil) or (chn_list == "0" and gfw_list == "0" and proxy_mode == "proxy") then
345340
-- 中国列表+百度 or 全局
@@ -349,7 +344,7 @@ function connect_status()
349344
url = "-x socks5h://" .. socks_server .. " " .. url
350345
end
351346
end
352-
local result = luci.sys.exec('/usr/bin/curl --max-time 5 -o /dev/null -I -sk ' .. url)
347+
local result = luci.sys.exec('/usr/bin/curl --connect-timeout 3 --max-time 5 -o /dev/null -I -sk ' .. url)
353348
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
354349
if code ~= 0 then
355350
local use_time_str = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/haproxy.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ o:depends("balancing_enable", true)
6666

6767
---- Passwall Inner implement Probe URL
6868
o = s:option(Value, "health_probe_url", translate("Probe URL"))
69-
o.default = "https://www.google.com/generate_204"
7069
o:value("https://cp.cloudflare.com/", "Cloudflare")
7170
o:value("https://www.gstatic.com/generate_204", "Gstatic")
7271
o:value("https://www.google.com/generate_204", "Google")
7372
o:value("https://www.youtube.com/generate_204", "YouTube")
7473
o:value("https://connect.rom.miui.com/generate_204", "MIUI (CN)")
7574
o:value("https://connectivitycheck.platform.hicloud.com/generate_204", "HiCloud (CN)")
75+
o.default = o.keylist[3]
7676
o.description = translate("The URL used to detect the connection status.")
7777
o:depends("health_check_type", "passwall_logic")
7878

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/node_list.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ o:value("tcping", "TCP Ping")
1818
o = s:option(Flag, "show_node_info", translate("Show server address and port"))
1919
o.default = "0"
2020

21+
o = s:option(Value, "url_test_url", translate("URL Test Address"))
22+
o:value("https://cp.cloudflare.com/", "Cloudflare")
23+
o:value("https://www.gstatic.com/generate_204", "Gstatic")
24+
o:value("https://www.google.com/generate_204", "Google")
25+
o:value("https://www.youtube.com/generate_204", "YouTube")
26+
o:value("https://connect.rom.miui.com/generate_204", "MIUI (CN)")
27+
o:value("https://connectivitycheck.platform.hicloud.com/generate_204", "HiCloud (CN)")
28+
o.default = o.keylist[3]
29+
2130
-- [[ Add the node via the link ]]--
2231
s:append(Template(appname .. "/node_list/link_add_node"))
2332

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ o.validate = port_validate
9494

9595
---- TCP Redir Ports
9696
o = s:option(Value, "tcp_redir_ports", translate("TCP Redir Ports"))
97-
o.default = "22,25,53,80,143,443,465,587,853,873,993,995,5222,8080,8443,9418"
9897
o:value("1:65535", translate("All"))
9998
o:value("22,25,53,80,143,443,465,587,853,873,993,995,5222,8080,8443,9418", translate("Common Use"))
10099
o:value("80,443", translate("Only Web"))
100+
o.default = o.keylist[2]
101101
o.validate = port_validate
102102

103103
---- UDP Redir Ports

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ o:value("https://cdn.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/
2222
o:value("https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt", translate("Loyalsoldier/v2ray-rules-dat"))
2323
o:value("https://cdn.jsdelivr.net/gh/Loukky/gfwlist-by-loukky/gfwlist.txt", translate("Loukky/gfwlist-by-loukky"))
2424
o:value("https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt", translate("gfwlist/gfwlist"))
25-
o.default = "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt"
25+
o.default = o.keylist[2]
2626

2727
----chnroute URL
2828
o = s:option(DynamicList, "chnroute_url", translate("China IPs(chnroute) Update URL"))
@@ -57,24 +57,26 @@ if has_xray or has_singbox then
5757
o:value("https://github.com/MetaCubeX/meta-rules-dat/releases/latest/download/geoip.dat", translate("MetaCubeX/geoip"))
5858
o:value("https://cdn.jsdelivr.net/gh/Loyalsoldier/geoip@release/geoip.dat", translate("Loyalsoldier/geoip (CDN)"))
5959
o:value("https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat", translate("MetaCubeX/geoip (CDN)"))
60-
o.default = "https://github.com/Loyalsoldier/geoip/releases/latest/download/geoip.dat"
60+
o.default = o.keylist[1]
6161

6262
o = s:option(ListValue, "geosite_url", translate("Geosite Update URL"))
6363
o:value("https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat", translate("Loyalsoldier/geosite"))
6464
o:value("https://github.com/MetaCubeX/meta-rules-dat/releases/latest/download/geosite.dat", translate("MetaCubeX/geosite"))
6565
o:value("https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat", translate("Loyalsoldier/geosite (CDN)"))
6666
o:value("https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat", translate("MetaCubeX/geosite (CDN)"))
67-
o.default = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"
67+
o.default = o.keylist[1]
6868

6969
o = s:option(Value, "v2ray_location_asset", translate("Location of Geo rule files"), translate("This variable specifies a directory where geoip.dat and geosite.dat files are."))
7070
o.default = "/usr/share/v2ray/"
7171
o.placeholder = "/usr/share/v2ray/"
7272
o.rmempty = false
7373

7474
if api.is_finded("geoview") then
75-
o = s:option(Flag, "geo2rule", translate("Generate Rule List from Geo"), translate("Generate rule lists such as GFW, China domains, and China IP ranges based on Geo files."))
75+
o = s:option(Flag, "geo2rule", translate("Generate Rule List from Geo"))
7676
o.default = 0
7777
o.rmempty = false
78+
o.description = translate("Generate rule lists such as GFW, China domains, and China IP ranges based on Geo files.") .. "<br><font color='red'>" ..
79+
translate("When manually updating with this option enabled, rules will be regenerated from existing Geo files even if no new version is available.") .. "</font>"
7880

7981
o = s:option(Flag, "enable_geoview", translate("Enable Geo Data Parsing"))
8082
o.default = 0

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/socks_config.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ o = s:option(Flag, "autoswitch_restore_switch", translate("Restore Switch"), tra
136136
o:depends("enable_autoswitch", true)
137137

138138
o = s:option(Value, "autoswitch_probe_url", translate("Probe URL"), translate("The URL used to detect the connection status."))
139-
o.default = "https://www.google.com/generate_204"
140139
o:value("https://cp.cloudflare.com/", "Cloudflare")
141140
o:value("https://www.gstatic.com/generate_204", "Gstatic")
142141
o:value("https://www.google.com/generate_204", "Google")
143142
o:value("https://www.youtube.com/generate_204", "YouTube")
144143
o:value("https://connect.rom.miui.com/generate_204", "MIUI (CN)")
145144
o:value("https://connectivitycheck.platform.hicloud.com/generate_204", "HiCloud (CN)")
145+
o.default = o.keylist[3]
146146
o:depends("enable_autoswitch", true)
147147

148-
o = s:option(DummyValue, "btn", " ")
148+
o = s:option(DummyValue, "btn")
149149
o.template = appname .. "/socks_auto_switch/btn"
150150
o:depends("enable_autoswitch", true)
151151

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ o:value("https://www.google.com/generate_204", "Google")
192192
o:value("https://www.youtube.com/generate_204", "YouTube")
193193
o:value("https://connect.rom.miui.com/generate_204", "MIUI (CN)")
194194
o:value("https://connectivitycheck.platform.hicloud.com/generate_204", "HiCloud (CN)")
195-
o.default = "https://www.google.com/generate_204"
195+
o.default = o.keylist[3]
196196
o.description = translate("The URL used to detect the connection status.")
197197

198198
-- 探测间隔
@@ -392,8 +392,7 @@ o = s:option(ListValue, _n("flow"), translate("flow"))
392392
o.default = ""
393393
o:value("", translate("Disable"))
394394
o:value("xtls-rprx-vision")
395-
o:depends({ [_n("protocol")] = "vless", [_n("transport")] = "raw" })
396-
o:depends({ [_n("protocol")] = "vless", [_n("transport")] = "xhttp" })
395+
o:depends({ [_n("protocol")] = "vless" })
397396

398397
o = s:option(Flag, _n("tls"), translate("TLS"))
399398
o.default = 0

applications/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ o:value("https://www.google.com/generate_204", "Google")
155155
o:value("https://www.youtube.com/generate_204", "YouTube")
156156
o:value("https://connect.rom.miui.com/generate_204", "MIUI (CN)")
157157
o:value("https://connectivitycheck.platform.hicloud.com/generate_204", "HiCloud (CN)")
158-
o.default = "https://www.gstatic.com/generate_204"
158+
o.default = o.keylist[3]
159159
o.description = translate("The URL used to detect the connection status.")
160160

161161
o = s:option(Value, _n("urltest_interval"), translate("Test interval"))

applications/luci-app-passwall/luasrc/model/cbi/passwall/server/type/ray.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ o = s:option(ListValue, _n("flow"), translate("flow"))
120120
o.default = ""
121121
o:value("", translate("Disable"))
122122
o:value("xtls-rprx-vision")
123-
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true, [_n("transport")] = "raw" })
124-
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true, [_n("transport")] = "xhttp" })
123+
o:depends({ [_n("protocol")] = "vless" })
125124

126125
o = s:option(Flag, _n("tls"), translate("TLS"))
127126
o.default = 0

0 commit comments

Comments
 (0)