Skip to content

Commit e99f13d

Browse files
authored
Merge pull request #227 from xream/feature/snell
feat: Added support for producing snell nodes with reuse and optional obfs
2 parents 431b1a3 + fcab840 commit e99f13d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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.14.3",
3+
"version": "2.14.4",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
55
"main": "src/main.js",
66
"scripts": {

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,15 @@ function snell(proxy) {
215215

216216
// obfs
217217
result.appendIfPresent(
218-
`,obfs=${proxy['obfs-opts'].mode}`,
218+
`,obfs=${proxy['obfs-opts']?.mode}`,
219219
'obfs-opts.mode',
220220
);
221221
result.appendIfPresent(
222-
`,obfs-host=${proxy['obfs-opts'].host}`,
222+
`,obfs-host=${proxy['obfs-opts']?.host}`,
223223
'obfs-opts.host',
224224
);
225225
result.appendIfPresent(
226-
`,obfs-uri=${proxy['obfs-opts'].path}`,
226+
`,obfs-uri=${proxy['obfs-opts']?.path}`,
227227
'obfs-opts.path',
228228
);
229229

@@ -233,6 +233,9 @@ function snell(proxy) {
233233
// test-url
234234
result.appendIfPresent(`,test-url=${proxy['test-url']}`, 'test-url');
235235

236+
// reuse
237+
result.appendIfPresent(`,reuse=${proxy['reuse']}`, 'reuse');
238+
236239
return result.toString();
237240
}
238241

0 commit comments

Comments
 (0)