Browse Source

luci-app-ssr-plus: use wget-ssl if possible

Fixes: #921

Signed-off-by: Tianling Shen <[email protected]>
Tianling Shen 3 years ago
parent
commit
85d8e28698

+ 1 - 1
luci-app-ssr-plus/root/etc/init.d/shadowsocksr

@@ -76,7 +76,7 @@ get_host_ip() {
 	if [ -z "$(echo $host | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}")" ]; then
 		if [ "$host" == "${host#*:[0-9a-fA-F]}" ]; then
 			ip=$(resolveip -4 -t 3 $host | awk 'NR==1{print}')
-			[ -z "$ip" ] && ip=$(uclient-fetch -q -O- http://119.29.29.29/d?dn=$host | awk -F ';' '{print $1}')
+			[ -z "$ip" ] && ip=$(wget -q -O- http://119.29.29.29/d?dn=$host | awk -F ';' '{print $1}')
 		fi
 	fi
 	[ -z "$ip" ] || uci_set_by_name $1 ip $ip

+ 1 - 1
luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua

@@ -439,7 +439,7 @@ local function processData(szType, content)
 end
 -- wget
 local function wget(url)
-	local stdout = luci.sys.exec('uclient-fetch -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('wget -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 .. '"')
 	return trim(stdout)
 end
 

+ 1 - 1
luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua

@@ -101,7 +101,7 @@ end
 
 local function update(url, file, type, file2)
 	local Num = 1
-	local refresh_cmd = "uclient-fetch --no-check-certificate -q -O /tmp/ssr-update." .. type .. " " .. url
+	local refresh_cmd = "wget --no-check-certificate -q -O /tmp/ssr-update." .. type .. " " .. url
 	local sret = luci.sys.call(refresh_cmd)
 	if sret == 0 then
 		if type == "gfw_data" then