diff --git a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm
index 7318e38a8e..be523e600e 100644
--- a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm
+++ b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm
@@ -14,6 +14,8 @@ local dsp = require "luci.dispatcher"
const dom = doms[index];
const port = ports[index];
if (!dom) res()
+ port.innerHTML = 'connecting...';
+
XHR.get('<%=dsp.build_url("admin/services/shadowsocksr/ping")%>', {
index,
domain: dom.getAttribute("hint"),
@@ -28,24 +30,22 @@ local dsp = require "luci.dispatcher"
}
dom.innerHTML = `${(result.ping ? result.ping : "--") + " ms"}`
if (result.socket) {
- port.innerHTML = 'ok'
+ port.innerHTML = 'ok';
} else {
- port.innerHTML = 'fail'
+ port.innerHTML = 'fail';
}
- res()
+ res();
});
})
}
- (async () => {
- for (let group = 0; group < Math.ceil(doms.length / 5); group++) {
- await Promise.all([
- xhr(group * 5 + 0),
- xhr(group * 5 + 1),
- xhr(group * 5 + 2),
- xhr(group * 5 + 3),
- xhr(group * 5 + 4),
- ])
+ let task = -1;
+ const thread = () => {
+ task = task + 1
+ if (doms[task]) {
+ xhr(task).then(thread);
}
- })()
- //]]>
-
+ }
+ for (let i = 0; i < 10; i++) {
+ thread()
+ }
+
\ No newline at end of file
diff --git a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/socket.htm b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/socket.htm
index 6cba5bc856..714fb56bf9 100644
--- a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/socket.htm
+++ b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/socket.htm
@@ -1,3 +1,3 @@
<%+cbi/valueheader%>
-connecting
+wait
<%+cbi/valuefooter%>
diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
index 7f64aaf75e..96ca3dd5ff 100644
--- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
+++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
@@ -105,7 +105,6 @@ local function processData(szType, content)
-- kcp_port = 0,
kcp_param = '--nocomp'
}
- result.hashkey = type(content) == 'string' and md5(content) or md5(jsonStringify(content))
if szType == 'ssr' then
local dat = split(content, "/\\?")
local hostInfo = split(dat[1], ':')
@@ -226,6 +225,11 @@ local function processData(szType, content)
if not result.alias then
result.alias = result.server .. ':' .. result.server_port
end
+ -- alias 不参与 hashkey 计算
+ local alias = result.alias
+ result.alias = nil
+ result.hashkey = md5(jsonStringify(result))
+ result.alias = alias
return result
end
-- wget