浏览代码

Merge branch 'master' of https://github.com/fw876/helloworld

lean 4 年之前
父节点
当前提交
6c328a22af
共有 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