mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-16 02:37:19 +08:00
feat: 兼容更多 VMess URI 格式
This commit is contained in:
parent
b061fca356
commit
40fb0fd7f3
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.64",
|
"version": "2.14.66",
|
||||||
"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": {
|
||||||
|
@ -240,7 +240,7 @@ function URI_VMess() {
|
|||||||
params.add = server;
|
params.add = server;
|
||||||
}
|
}
|
||||||
const proxy = {
|
const proxy = {
|
||||||
name: params.ps ?? params.remark,
|
name: params.ps ?? params.remarks,
|
||||||
type: 'vmess',
|
type: 'vmess',
|
||||||
server: params.add,
|
server: params.add,
|
||||||
port: parseInt(getIfPresent(params.port), 10),
|
port: parseInt(getIfPresent(params.port), 10),
|
||||||
@ -272,6 +272,14 @@ function URI_VMess() {
|
|||||||
}
|
}
|
||||||
if (proxy.network) {
|
if (proxy.network) {
|
||||||
let transportHost = params.host ?? params.obfsParam;
|
let transportHost = params.host ?? params.obfsParam;
|
||||||
|
try {
|
||||||
|
const parsedObfs = JSON.parse(transportHost);
|
||||||
|
const parsedHost = parsedObfs?.Host;
|
||||||
|
if (parsedHost) {
|
||||||
|
transportHost = parsedHost;
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line no-empty
|
||||||
|
} catch (e) {}
|
||||||
let transportPath = params.path;
|
let transportPath = params.path;
|
||||||
|
|
||||||
if (proxy.network === 'http') {
|
if (proxy.network === 'http') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user