浏览代码

luci-app-ssr-plus: fix parsing ss server_port

Signed-off-by: Tianling Shen <[email protected]>
Tianling Shen 4 年之前
父节点
当前提交
6d9dc69c8d

+ 1 - 1
luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm

@@ -109,7 +109,7 @@ function import_ssr_url(btn, urlname, sid) {
 				var temp = url0.substr(sipIndex + 1).split("/?");
 				var serverInfo = temp[0].split(":");
 				var server = serverInfo[0];
-				var port = serverInfo[1];
+				var port = serverInfo[1].replace("/","");
 				var method, password, plugin, pluginOpts;
 				if (temp[1]) {
 					var pluginInfo = decodeURIComponent(temp[1]);

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

@@ -247,7 +247,7 @@ local function processData(szType, content)
 				end
 			end
 		else
-			result.server_port = host[2]
+			result.server_port = host[2]:gsub("/","")
 		end
 		if checkTabValue(encrypt_methods_ss)[method] then
 			result.encrypt_method_ss = method