修复SS URI的一处解析错误

This commit is contained in:
Peng-YM
2020-08-31 19:10:29 +08:00
parent 8a85d6dd21
commit 78991ddca8
2 changed files with 66 additions and 67 deletions

View File

@@ -621,7 +621,6 @@ function URI_SS() {
supported
}
content = content.split("#")[0]; // strip proxy name
// handle IPV4 and IPV6
const serverAndPort = content.match(/@([^\/]*)(\/|$)/)[1];
const portIdx = serverAndPort.lastIndexOf(":");
@@ -635,7 +634,7 @@ function URI_SS() {
// handle obfs
const idx = content.indexOf("?plugin=");
if (idx !== -1) {
const pluginInfo = ("plugin=" + decodeURIComponent(content.split("?plugin=")[1])).split(";");
const pluginInfo = ("plugin=" + decodeURIComponent(content.split("?plugin=")[1].split("&")[0])).split(";");
const params = {};
for (const item of pluginInfo) {
const [key, val] = item.split("=");