Skip to content

Commit c07a15b

Browse files
committed
feat: 修复并增强 shadowsocks uri v2ray-plugin 兼容性
1 parent 517136d commit c07a15b

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.21.34",
3+
"version": "2.21.35",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/parsers/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ function URI_SS() {
303303
proxy.plugin = 'v2ray-plugin';
304304
proxy['plugin-opts'] = {
305305
mode: 'websocket',
306-
host: getIfNotBlank(params['obfs-host']),
306+
host:
307+
getIfNotBlank(params['obfs-host']) ||
308+
getIfNotBlank(params['host']),
307309
path: getIfNotBlank(params.path),
308310
tls: getIfPresent(params.tls),
309311
};

backend/src/core/proxy-utils/producers/uri.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ export default function URI_Producer() {
201201
case 'v2ray-plugin':
202202
query += encodeURIComponent(
203203
`v2ray-plugin;obfs=${opts.mode}${
204-
opts.host ? ';obfs-host' + opts.host : ''
204+
opts.host ? ';obfs-host=' + opts.host : ''
205+
}${opts.host ? ';host=' + opts.host : ''}${
206+
opts.path ? ';path=' + opts.path : ''
205207
}${opts.tls ? ';tls' : ''}`,
206208
);
207209
break;

0 commit comments

Comments
 (0)