Skip to content

Commit

Permalink
fix: SS URI 端口取整数部分
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Nov 28, 2023
1 parent 1fc5b76 commit 5a64508
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.102",
"version": "2.14.103",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion backend/src/core/proxy-utils/parsers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5a64508

Please sign in to comment.