Skip to content

Commit

Permalink
feat: 兼容更多 VMess URI 格式
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Oct 9, 2023
1 parent b061fca commit 40fb0fd
Show file tree
Hide file tree
Showing 2 changed files with 10 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.64",
"version": "2.14.66",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
10 changes: 9 additions & 1 deletion backend/src/core/proxy-utils/parsers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function URI_VMess() {
params.add = server;
}
const proxy = {
name: params.ps ?? params.remark,
name: params.ps ?? params.remarks,
type: 'vmess',
server: params.add,
port: parseInt(getIfPresent(params.port), 10),
Expand Down Expand Up @@ -272,6 +272,14 @@ function URI_VMess() {
}
if (proxy.network) {
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;

if (proxy.network === 'http') {
Expand Down

0 comments on commit 40fb0fd

Please sign in to comment.