feat: Added support for producing snell nodes with reuse and optional obfs

This commit is contained in:
xream 2023-07-31 18:41:48 +08:00
parent 431b1a3c8e
commit fcab8401e0
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.3",
"version": "2.14.4",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -215,15 +215,15 @@ function snell(proxy) {
// obfs
result.appendIfPresent(
`,obfs=${proxy['obfs-opts'].mode}`,
`,obfs=${proxy['obfs-opts']?.mode}`,
'obfs-opts.mode',
);
result.appendIfPresent(
`,obfs-host=${proxy['obfs-opts'].host}`,
`,obfs-host=${proxy['obfs-opts']?.host}`,
'obfs-opts.host',
);
result.appendIfPresent(
`,obfs-uri=${proxy['obfs-opts'].path}`,
`,obfs-uri=${proxy['obfs-opts']?.path}`,
'obfs-opts.path',
);
@ -233,6 +233,9 @@ function snell(proxy) {
// test-url
result.appendIfPresent(`,test-url=${proxy['test-url']}`, 'test-url');
// reuse
result.appendIfPresent(`,reuse=${proxy['reuse']}`, 'reuse');
return result.toString();
}