Przeglądaj źródła

Fix the error that wss cannot connect when only using CDN IP

Mattraks 4 lat temu
rodzic
commit
ce5261f37c

+ 1 - 1
luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua

@@ -77,7 +77,7 @@ function refresh_data()
 	local retstring = 0
 	local function update(url, file, type, file2)
 		local Num = 1
-		refresh_cmd = "wget-ssl --no-check-certificate -t 3 -T 10 -O- " .. url .. " > /tmp/ssr-update." .. type
+		refresh_cmd = "wget --no-check-certificate -t 3 -T 10 -O- " .. url .. " > /tmp/ssr-update." .. type
 		sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
 		if sret == 0 then
 			if type == "gfw_data" then

+ 3 - 3
luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua

@@ -90,10 +90,10 @@ outbound = {
 			},
 			seed = server.seed or nil
 		} or nil,
-		wsSettings = (server.transport == "ws") and (server.ws_path or server.ws_host) and {
+		wsSettings = (server.transport == "ws") and (server.ws_path or server.ws_host or server.tls_host) and {
 			path = server.ws_path,
-			headers = (server.ws_host) and {
-				Host = server.ws_host
+			headers = (server.ws_host or server.tls_host) and {
+				Host = server.ws_host or server.tls_host
 			} or nil,
 		} or nil,
 		httpSettings = (server.transport == "h2") and {

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

@@ -278,7 +278,7 @@ local function processData(szType, content)
 end
 -- wget
 local function wget(url)
-	local stdout = luci.sys.exec('wget-ssl -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 -t 3 -T 10 -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 -t 3 -T 10 -O- "' .. url .. '"')
 	return trim(stdout)
 end
 

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

@@ -13,7 +13,7 @@ end
 
 local function update(url, file, type, file2)
 	local Num = 1
-	refresh_cmd = "wget-ssl --no-check-certificate -t 3 -T 10 -O- " .. url .. " > /tmp/ssr-update." .. type
+	refresh_cmd = "wget --no-check-certificate -t 3 -T 10 -O- " .. url .. " > /tmp/ssr-update." .. type
 	sret = luci.sys.call(refresh_cmd .. " 2>/dev/null")
 	if sret == 0 then
 		if type == "gfw_data" then