Преглед изворни кода

Merge pull request #564 from acooler15/master

Add the '-k' param to the curl command
coolsnowwolf пре 4 година
родитељ
комит
fc92437662
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua

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

@@ -54,7 +54,7 @@ function act_ping()
 	if transport == "ws" then
 		local prefix = tls=='1' and "https://" or "http://"
 		local address = prefix..domain..':'..port..wsPath
-		local result = luci.sys.exec("curl --http1.1 -m 3 -s  -i -N -o /dev/null -w 'time_connect=%{time_connect}\nhttp_code=%{http_code}' -H 'Connection: Upgrade' -H 'Upgrade: websocket' -H 'Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==' -H 'Sec-WebSocket-Version: 13' "..address)
+		local result = luci.sys.exec("curl --http1.1 -m 2 -ksN -o /dev/null -w 'time_connect=%{time_connect}\nhttp_code=%{http_code}' -H 'Connection: Upgrade' -H 'Upgrade: websocket' -H 'Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==' -H 'Sec-WebSocket-Version: 13' "..address)
 		e.socket = string.match(result,"http_code=(%d+)")=="101"
 		e.ping = tonumber(string.match(result, "time_connect=(%d+.%d%d%d)"))*1000
 	else