mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
fix: proxy duplicate issue
This commit is contained in:
@@ -50,6 +50,7 @@ function parse(raw) {
|
||||
lastParser = parser;
|
||||
success = true;
|
||||
$.info(`${parser.name} is activated`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,8 +112,11 @@ function URI_SSR() {
|
||||
line = line.split('/?')[1].split('&');
|
||||
if (line.length > 1) {
|
||||
for (const item of line) {
|
||||
const [key, val] = item.split('=');
|
||||
other_params[key] = val.trim();
|
||||
let [key, val] = item.split('=');
|
||||
val = val.trim();
|
||||
if (val.length > 0) {
|
||||
other_params[key] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
proxy = {
|
||||
@@ -242,14 +245,17 @@ function URI_Trojan() {
|
||||
const name = decodeURIComponent(line.split('#')[1].trim());
|
||||
let paramArr = line.split('?');
|
||||
let scert = null;
|
||||
let params;
|
||||
const params = new Map();
|
||||
if (paramArr.length > 1) {
|
||||
paramArr = paramArr[1].split('#')[0].split('&');
|
||||
params = new Map(
|
||||
paramArr.map((item) => {
|
||||
return item.split('=');
|
||||
}),
|
||||
);
|
||||
for (const pair of paramArr) {
|
||||
let [key, val] = pair.split('=');
|
||||
// skip empty values
|
||||
val = val.trim();
|
||||
if (val.length > 0) {
|
||||
params.set(key, val);
|
||||
}
|
||||
}
|
||||
if (
|
||||
params.get('allowInsecure') === '1' ||
|
||||
params.get('allowInsecure') === 'true'
|
||||
|
||||
Reference in New Issue
Block a user