mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-04 11:13:59 +08:00
fix: 修复 SS URI 解析
This commit is contained in:
parent
4713b63083
commit
d015c7867e
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.437",
|
"version": "2.14.438",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -46,7 +46,9 @@ function URI_SS() {
|
|||||||
content = content.split('#')[0]; // strip proxy name
|
content = content.split('#')[0]; // strip proxy name
|
||||||
// handle IPV4 and IPV6
|
// handle IPV4 and IPV6
|
||||||
let serverAndPortArray = content.match(/@([^/]*)(\/|$)/);
|
let serverAndPortArray = content.match(/@([^/]*)(\/|$)/);
|
||||||
let userInfoStr = Base64.decode(content.split('@')[0]);
|
let userInfoStr = Base64.decode(
|
||||||
|
decodeURIComponent(content.split('@')[0]),
|
||||||
|
);
|
||||||
let query = '';
|
let query = '';
|
||||||
if (!serverAndPortArray) {
|
if (!serverAndPortArray) {
|
||||||
if (content.includes('?')) {
|
if (content.includes('?')) {
|
||||||
@ -77,7 +79,6 @@ function URI_SS() {
|
|||||||
proxy.port = `${serverAndPort.substring(portIdx + 1)}`.match(
|
proxy.port = `${serverAndPort.substring(portIdx + 1)}`.match(
|
||||||
/\d+/,
|
/\d+/,
|
||||||
)?.[0];
|
)?.[0];
|
||||||
|
|
||||||
const userInfo = userInfoStr.match(/(^.*?):(.*$)/);
|
const userInfo = userInfoStr.match(/(^.*?):(.*$)/);
|
||||||
proxy.cipher = userInfo[1];
|
proxy.cipher = userInfo[1];
|
||||||
proxy.password = userInfo[2];
|
proxy.password = userInfo[2];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user