mirror of https://github.com/kenzok8/small.git
update 2024-05-27 12:14:03
This commit is contained in:
parent
5ebe138c7f
commit
695583d045
|
@ -250,19 +250,17 @@ function connect_status()
|
|||
local e = {}
|
||||
e.use_time = ""
|
||||
local url = luci.http.formvalue("url")
|
||||
local is_baidu = string.find(url, "baidu")
|
||||
local pw_switch = uci:get(appname, "@global[0]", "enabled")
|
||||
local baidu = string.find(url, "baidu")
|
||||
local enabled = uci:get(appname, "@global[0]", "enabled")
|
||||
local chn_list = uci:get(appname, "@global[0]", "chn_list")
|
||||
local gfw_list = uci:get(appname, "@global[0]", "use_gfw_list") or "1"
|
||||
local proxy_mode = uci:get(appname, "@global[0]", "tcp_proxy_mode")
|
||||
local socks_port = uci:get(appname, "@global[0]", "tcp_node_socks_port")
|
||||
if pw_switch ~= 0 then
|
||||
if chn_list == "proxy" then
|
||||
if is_baidu ~= nil then
|
||||
url = "--socks5 127.0.0.1:" .. socks_port .. " " .. url
|
||||
end
|
||||
else
|
||||
if is_baidu == nil then
|
||||
url = "--socks5 127.0.0.1:" .. socks_port .. " " .. url
|
||||
end
|
||||
if enabled ~= 0 then
|
||||
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
|
||||
url = "--socks5 127.0.0.1:" .. socks_port .. " " .. url
|
||||
elseif baidu == nil then
|
||||
url = "--socks5 127.0.0.1:" .. socks_port .. " " .. url
|
||||
end
|
||||
end
|
||||
local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk -w "%{http_code}:%{time_appconnect}" ' .. url)
|
||||
|
|
|
@ -30,7 +30,7 @@ define Download/geosite
|
|||
HASH:=25d6120b009498ac83ae723e9751a19ff545fac4800dad53ab6e2592c3407533
|
||||
endef
|
||||
|
||||
GEOSITE_IRAN_VER:=202405201648
|
||||
GEOSITE_IRAN_VER:=202405270027
|
||||
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
|
||||
define Download/geosite-ir
|
||||
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
|
||||
|
|
Loading…
Reference in New Issue