fix: SS URI 端口取整数部分

This commit is contained in:
xream
2023-11-28 23:14:45 +08:00
parent 1fc5b764fe
commit 5a645081d1
2 changed files with 4 additions and 2 deletions

View File

@@ -33,7 +33,9 @@ function URI_SS() {
const serverAndPort = serverAndPortArray[1];
const portIdx = serverAndPort.lastIndexOf(':');
proxy.server = serverAndPort.substring(0, portIdx);
proxy.port = serverAndPort.substring(portIdx + 1);
proxy.port = `${serverAndPort.substring(portIdx + 1)}`.match(
/\d+/,
)?.[0];
const userInfo = userInfoStr.split(':');
proxy.cipher = userInfo[0];