parent
28550d9d44
commit
b752d1c41a
@ -39,7 +39,7 @@ LUCI_PKGARCH:=all
|
|||||||
LUCI_DEPENDS:= \
|
LUCI_DEPENDS:= \
|
||||||
+coreutils +coreutils-base64 +dns2tcp +dnsmasq-full +@PACKAGE_dnsmasq_full_ipset +ipset +kmod-ipt-nat +jq \
|
+coreutils +coreutils-base64 +dns2tcp +dnsmasq-full +@PACKAGE_dnsmasq_full_ipset +ipset +kmod-ipt-nat +jq \
|
||||||
+ip-full +iptables +iptables-mod-tproxy +lua +lua-neturl +libuci-lua +microsocks \
|
+ip-full +iptables +iptables-mod-tproxy +lua +lua-neturl +libuci-lua +microsocks \
|
||||||
+tcping +resolveip +shadowsocksr-libev-ssr-check +wget-ssl \
|
+tcping +resolveip +shadowsocksr-libev-ssr-check +curl \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:curl \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:curl \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray-core \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray-core \
|
||||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray:curl \
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray:curl \
|
||||||
|
@ -95,7 +95,7 @@ get_host_ip() {
|
|||||||
if [ -z "$(echo $host | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}")" ]; then
|
if [ -z "$(echo $host | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}")" ]; then
|
||||||
if [ "$host" == "${host#*:[0-9a-fA-F]}" ]; then
|
if [ "$host" == "${host#*:[0-9a-fA-F]}" ]; then
|
||||||
ip=$(resolveip -4 -t 3 $host | awk 'NR==1{print}')
|
ip=$(resolveip -4 -t 3 $host | awk 'NR==1{print}')
|
||||||
[ -z "$ip" ] && ip=$(wget -q -O- http://119.29.29.29/d?dn=$host | awk -F ';' '{print $1}')
|
[ -z "$ip" ] && ip=$(curl -sSL "http://119.29.29.29/d?dn=$host" | awk -F ';' '{print $1}')
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
[ -z "$ip" ] || uci_set_by_name $1 ip $ip
|
[ -z "$ip" ] || uci_set_by_name $1 ip $ip
|
||||||
|
@ -680,12 +680,12 @@ local function processData(szType, content)
|
|||||||
result.switch_enable = switch_enable
|
result.switch_enable = switch_enable
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
-- wget
|
-- curl
|
||||||
local function wget(url)
|
local function curl(url)
|
||||||
-- 清理URL中的隐藏字符
|
-- 清理URL中的隐藏字符
|
||||||
url = url:gsub("%s+$", ""):gsub("^%s+", ""):gsub("%z", "")
|
url = url:gsub("%s+$", ""):gsub("^%s+", ""):gsub("%z", "")
|
||||||
|
|
||||||
local stdout = luci.sys.exec('wget-ssl --timeout=20 --tries=3 -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --no-check-certificate -O- "' .. url .. '"')
|
local stdout = luci.sys.exec('curl -sSL --connect-timeout 20 --max-time 30 --retry 3 -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --insecure --location "' .. url .. '"')
|
||||||
return trim(stdout)
|
return trim(stdout)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ local execute = function()
|
|||||||
luci.sys.init.stop(name)
|
luci.sys.init.stop(name)
|
||||||
end
|
end
|
||||||
for k, url in ipairs(subscribe_url) do
|
for k, url in ipairs(subscribe_url) do
|
||||||
local raw = wget(url)
|
local raw = curl(url)
|
||||||
if #raw > 0 then
|
if #raw > 0 then
|
||||||
local nodes, szType
|
local nodes, szType
|
||||||
local groupHash = md5(url)
|
local groupHash = md5(url)
|
||||||
|
@ -150,7 +150,7 @@ end
|
|||||||
|
|
||||||
local function update(url, file, type, file2)
|
local function update(url, file, type, file2)
|
||||||
local Num = 1
|
local Num = 1
|
||||||
local refresh_cmd = "wget --no-check-certificate -q -O /tmp/ssr-update." .. type .. " " .. url
|
local refresh_cmd = "curl -sSL --insecure -o /tmp/ssr-update." .. type .. " " .. url
|
||||||
local sret = luci.sys.call(refresh_cmd)
|
local sret = luci.sys.call(refresh_cmd)
|
||||||
if sret == 0 then
|
if sret == 0 then
|
||||||
if type == "gfw_data" then
|
if type == "gfw_data" then
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile
|
diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile
|
||||||
index 697d594..ce23c14 100644
|
index 28753af..0d1470d 100644
|
||||||
--- a/luci-app-ssr-plus/Makefile
|
--- a/luci-app-ssr-plus/Makefile
|
||||||
+++ b/luci-app-ssr-plus/Makefile
|
+++ b/luci-app-ssr-plus/Makefile
|
||||||
@@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS:= \
|
@@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS:= \
|
||||||
@ -237,7 +237,7 @@ index cf4ca1f..04f2896 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
index 22b6c7c..f086636 100755
|
index 58f1976..b81d0af 100755
|
||||||
--- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
--- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
+++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
+++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
@@ -1287,8 +1287,18 @@ start_server() {
|
@@ -1287,8 +1287,18 @@ start_server() {
|
||||||
|
Loading…
Reference in New Issue
Block a user