surgio 3.2.1 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/base-command.d.ts +1 -0
- package/build/base-command.js +8 -1
- package/build/base-command.js.map +1 -1
- package/build/commands/check.js +1 -2
- package/build/commands/check.js.map +1 -1
- package/build/commands/clean-cache.js +1 -2
- package/build/commands/clean-cache.js.map +1 -1
- package/build/commands/doctor.js +1 -2
- package/build/commands/doctor.js.map +1 -1
- package/build/commands/generate.js +1 -2
- package/build/commands/generate.js.map +1 -1
- package/build/commands/lint.js +1 -0
- package/build/commands/lint.js.map +1 -1
- package/build/commands/new.js +3 -2
- package/build/commands/new.js.map +1 -1
- package/build/commands/subscriptions.js +1 -2
- package/build/commands/subscriptions.js.map +1 -1
- package/build/commands/upload.js +1 -3
- package/build/commands/upload.js.map +1 -1
- package/build/configurables.d.ts +1 -1
- package/build/utils/cache.d.ts +1 -1
- package/build/utils/loon.js +6 -0
- package/build/utils/loon.js.map +1 -1
- package/build/utils/remote-snippet.js +1 -0
- package/build/utils/remote-snippet.js.map +1 -1
- package/build/utils/surge.js +5 -6
- package/build/utils/surge.js.map +1 -1
- package/build/validators/common.d.ts +146 -2
- package/build/validators/common.js +5 -0
- package/build/validators/common.js.map +1 -1
- package/build/validators/http.d.ts +149 -5
- package/build/validators/hysteria2.d.ts +75 -3
- package/build/validators/shadowsocks.d.ts +74 -2
- package/build/validators/shadowsocksr.d.ts +74 -2
- package/build/validators/snell.d.ts +74 -2
- package/build/validators/socks5.d.ts +74 -2
- package/build/validators/surgio-config.d.ts +44 -4
- package/build/validators/surgio-config.js +23 -31
- package/build/validators/surgio-config.js.map +1 -1
- package/build/validators/trojan.d.ts +75 -3
- package/build/validators/tuic.d.ts +300 -12
- package/build/validators/vmess.d.ts +74 -2
- package/build/validators/wireguard.d.ts +72 -0
- package/hygen-template/artifact/new/index.js +2 -2
- package/hygen-template/provider/new/index.js +10 -5
- package/hygen-template/provider/new/template.ejs.t +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { NodeTypeEnum } from '../types';
|
|
3
3
|
export declare const TuicNodeV5ConfigValidator: z.ZodObject<{
|
|
4
|
+
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
5
|
+
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
resolveHostname?: boolean | undefined;
|
|
10
|
+
vmessAEAD?: boolean | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
resolveHostname?: boolean | undefined;
|
|
13
|
+
vmessAEAD?: boolean | undefined;
|
|
14
|
+
}>>;
|
|
15
|
+
surfboardConfig: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
vmessAEAD?: boolean | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
vmessAEAD?: boolean | undefined;
|
|
21
|
+
}>>;
|
|
22
|
+
quantumultXConfig: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
vmessAEAD?: boolean | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
vmessAEAD?: boolean | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
clashConfig: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
enableTuic: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
enableShadowTls: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
enableHysteria2: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
enableTuic?: boolean | undefined;
|
|
36
|
+
enableShadowTls?: boolean | undefined;
|
|
37
|
+
enableHysteria2?: boolean | undefined;
|
|
38
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
enableTuic?: boolean | undefined;
|
|
41
|
+
enableShadowTls?: boolean | undefined;
|
|
42
|
+
enableHysteria2?: boolean | undefined;
|
|
43
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
44
|
+
}>>;
|
|
4
45
|
mptcp: z.ZodOptional<z.ZodBoolean>;
|
|
5
46
|
tfo: z.ZodOptional<z.ZodBoolean>;
|
|
6
47
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
@@ -24,7 +65,6 @@ export declare const TuicNodeV5ConfigValidator: z.ZodObject<{
|
|
|
24
65
|
}>>;
|
|
25
66
|
testUrl: z.ZodOptional<z.ZodString>;
|
|
26
67
|
hostname: z.ZodString;
|
|
27
|
-
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
28
68
|
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
29
69
|
alpn: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
|
|
30
70
|
serverCertFingerprintSha256: z.ZodOptional<z.ZodString>;
|
|
@@ -33,13 +73,29 @@ export declare const TuicNodeV5ConfigValidator: z.ZodObject<{
|
|
|
33
73
|
uuid: z.ZodString;
|
|
34
74
|
version: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
35
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
port: string | number;
|
|
36
77
|
type: NodeTypeEnum.Tuic;
|
|
37
78
|
password: string;
|
|
38
79
|
nodeName: string;
|
|
39
80
|
version: string | number;
|
|
40
81
|
hostname: string;
|
|
41
|
-
port: string | number;
|
|
42
82
|
uuid: string;
|
|
83
|
+
surgeConfig?: {
|
|
84
|
+
resolveHostname?: boolean | undefined;
|
|
85
|
+
vmessAEAD?: boolean | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
surfboardConfig?: {
|
|
88
|
+
vmessAEAD?: boolean | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
quantumultXConfig?: {
|
|
91
|
+
vmessAEAD?: boolean | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
clashConfig?: {
|
|
94
|
+
enableTuic?: boolean | undefined;
|
|
95
|
+
enableShadowTls?: boolean | undefined;
|
|
96
|
+
enableHysteria2?: boolean | undefined;
|
|
97
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
98
|
+
} | undefined;
|
|
43
99
|
mptcp?: boolean | undefined;
|
|
44
100
|
tfo?: boolean | undefined;
|
|
45
101
|
underlyingProxy?: string | undefined;
|
|
@@ -57,13 +113,29 @@ export declare const TuicNodeV5ConfigValidator: z.ZodObject<{
|
|
|
57
113
|
alpn?: [string, ...string[]] | undefined;
|
|
58
114
|
serverCertFingerprintSha256?: string | undefined;
|
|
59
115
|
}, {
|
|
116
|
+
port: string | number;
|
|
60
117
|
type: NodeTypeEnum.Tuic;
|
|
61
118
|
password: string;
|
|
62
119
|
nodeName: string;
|
|
63
120
|
version: string | number;
|
|
64
121
|
hostname: string;
|
|
65
|
-
port: string | number;
|
|
66
122
|
uuid: string;
|
|
123
|
+
surgeConfig?: {
|
|
124
|
+
resolveHostname?: boolean | undefined;
|
|
125
|
+
vmessAEAD?: boolean | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
surfboardConfig?: {
|
|
128
|
+
vmessAEAD?: boolean | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
quantumultXConfig?: {
|
|
131
|
+
vmessAEAD?: boolean | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
clashConfig?: {
|
|
134
|
+
enableTuic?: boolean | undefined;
|
|
135
|
+
enableShadowTls?: boolean | undefined;
|
|
136
|
+
enableHysteria2?: boolean | undefined;
|
|
137
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
138
|
+
} | undefined;
|
|
67
139
|
mptcp?: boolean | undefined;
|
|
68
140
|
tfo?: boolean | undefined;
|
|
69
141
|
underlyingProxy?: string | undefined;
|
|
@@ -82,6 +154,47 @@ export declare const TuicNodeV5ConfigValidator: z.ZodObject<{
|
|
|
82
154
|
serverCertFingerprintSha256?: string | undefined;
|
|
83
155
|
}>;
|
|
84
156
|
export declare const TuicNodeV4ConfigValidator: z.ZodObject<{
|
|
157
|
+
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
158
|
+
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
resolveHostname?: boolean | undefined;
|
|
163
|
+
vmessAEAD?: boolean | undefined;
|
|
164
|
+
}, {
|
|
165
|
+
resolveHostname?: boolean | undefined;
|
|
166
|
+
vmessAEAD?: boolean | undefined;
|
|
167
|
+
}>>;
|
|
168
|
+
surfboardConfig: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
vmessAEAD?: boolean | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
vmessAEAD?: boolean | undefined;
|
|
174
|
+
}>>;
|
|
175
|
+
quantumultXConfig: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
vmessAEAD?: boolean | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
vmessAEAD?: boolean | undefined;
|
|
181
|
+
}>>;
|
|
182
|
+
clashConfig: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
enableTuic: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
+
enableShadowTls: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
enableHysteria2: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
+
clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>;
|
|
187
|
+
}, "strip", z.ZodTypeAny, {
|
|
188
|
+
enableTuic?: boolean | undefined;
|
|
189
|
+
enableShadowTls?: boolean | undefined;
|
|
190
|
+
enableHysteria2?: boolean | undefined;
|
|
191
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
enableTuic?: boolean | undefined;
|
|
194
|
+
enableShadowTls?: boolean | undefined;
|
|
195
|
+
enableHysteria2?: boolean | undefined;
|
|
196
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
197
|
+
}>>;
|
|
85
198
|
mptcp: z.ZodOptional<z.ZodBoolean>;
|
|
86
199
|
tfo: z.ZodOptional<z.ZodBoolean>;
|
|
87
200
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
@@ -105,18 +218,33 @@ export declare const TuicNodeV4ConfigValidator: z.ZodObject<{
|
|
|
105
218
|
}>>;
|
|
106
219
|
testUrl: z.ZodOptional<z.ZodString>;
|
|
107
220
|
hostname: z.ZodString;
|
|
108
|
-
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
109
221
|
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
110
222
|
alpn: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
|
|
111
223
|
serverCertFingerprintSha256: z.ZodOptional<z.ZodString>;
|
|
112
224
|
type: z.ZodLiteral<NodeTypeEnum.Tuic>;
|
|
113
225
|
token: z.ZodString;
|
|
114
226
|
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
port: string | number;
|
|
115
228
|
type: NodeTypeEnum.Tuic;
|
|
116
229
|
nodeName: string;
|
|
117
230
|
hostname: string;
|
|
118
|
-
port: string | number;
|
|
119
231
|
token: string;
|
|
232
|
+
surgeConfig?: {
|
|
233
|
+
resolveHostname?: boolean | undefined;
|
|
234
|
+
vmessAEAD?: boolean | undefined;
|
|
235
|
+
} | undefined;
|
|
236
|
+
surfboardConfig?: {
|
|
237
|
+
vmessAEAD?: boolean | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
quantumultXConfig?: {
|
|
240
|
+
vmessAEAD?: boolean | undefined;
|
|
241
|
+
} | undefined;
|
|
242
|
+
clashConfig?: {
|
|
243
|
+
enableTuic?: boolean | undefined;
|
|
244
|
+
enableShadowTls?: boolean | undefined;
|
|
245
|
+
enableHysteria2?: boolean | undefined;
|
|
246
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
247
|
+
} | undefined;
|
|
120
248
|
mptcp?: boolean | undefined;
|
|
121
249
|
tfo?: boolean | undefined;
|
|
122
250
|
underlyingProxy?: string | undefined;
|
|
@@ -134,11 +262,27 @@ export declare const TuicNodeV4ConfigValidator: z.ZodObject<{
|
|
|
134
262
|
alpn?: [string, ...string[]] | undefined;
|
|
135
263
|
serverCertFingerprintSha256?: string | undefined;
|
|
136
264
|
}, {
|
|
265
|
+
port: string | number;
|
|
137
266
|
type: NodeTypeEnum.Tuic;
|
|
138
267
|
nodeName: string;
|
|
139
268
|
hostname: string;
|
|
140
|
-
port: string | number;
|
|
141
269
|
token: string;
|
|
270
|
+
surgeConfig?: {
|
|
271
|
+
resolveHostname?: boolean | undefined;
|
|
272
|
+
vmessAEAD?: boolean | undefined;
|
|
273
|
+
} | undefined;
|
|
274
|
+
surfboardConfig?: {
|
|
275
|
+
vmessAEAD?: boolean | undefined;
|
|
276
|
+
} | undefined;
|
|
277
|
+
quantumultXConfig?: {
|
|
278
|
+
vmessAEAD?: boolean | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
clashConfig?: {
|
|
281
|
+
enableTuic?: boolean | undefined;
|
|
282
|
+
enableShadowTls?: boolean | undefined;
|
|
283
|
+
enableHysteria2?: boolean | undefined;
|
|
284
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
285
|
+
} | undefined;
|
|
142
286
|
mptcp?: boolean | undefined;
|
|
143
287
|
tfo?: boolean | undefined;
|
|
144
288
|
underlyingProxy?: string | undefined;
|
|
@@ -157,6 +301,47 @@ export declare const TuicNodeV4ConfigValidator: z.ZodObject<{
|
|
|
157
301
|
serverCertFingerprintSha256?: string | undefined;
|
|
158
302
|
}>;
|
|
159
303
|
export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
304
|
+
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
305
|
+
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
306
|
+
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
307
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
}, "strip", z.ZodTypeAny, {
|
|
309
|
+
resolveHostname?: boolean | undefined;
|
|
310
|
+
vmessAEAD?: boolean | undefined;
|
|
311
|
+
}, {
|
|
312
|
+
resolveHostname?: boolean | undefined;
|
|
313
|
+
vmessAEAD?: boolean | undefined;
|
|
314
|
+
}>>;
|
|
315
|
+
surfboardConfig: z.ZodOptional<z.ZodObject<{
|
|
316
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
317
|
+
}, "strip", z.ZodTypeAny, {
|
|
318
|
+
vmessAEAD?: boolean | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
vmessAEAD?: boolean | undefined;
|
|
321
|
+
}>>;
|
|
322
|
+
quantumultXConfig: z.ZodOptional<z.ZodObject<{
|
|
323
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
vmessAEAD?: boolean | undefined;
|
|
326
|
+
}, {
|
|
327
|
+
vmessAEAD?: boolean | undefined;
|
|
328
|
+
}>>;
|
|
329
|
+
clashConfig: z.ZodOptional<z.ZodObject<{
|
|
330
|
+
enableTuic: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
+
enableShadowTls: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
+
enableHysteria2: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
enableTuic?: boolean | undefined;
|
|
336
|
+
enableShadowTls?: boolean | undefined;
|
|
337
|
+
enableHysteria2?: boolean | undefined;
|
|
338
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
339
|
+
}, {
|
|
340
|
+
enableTuic?: boolean | undefined;
|
|
341
|
+
enableShadowTls?: boolean | undefined;
|
|
342
|
+
enableHysteria2?: boolean | undefined;
|
|
343
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
344
|
+
}>>;
|
|
160
345
|
mptcp: z.ZodOptional<z.ZodBoolean>;
|
|
161
346
|
tfo: z.ZodOptional<z.ZodBoolean>;
|
|
162
347
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
@@ -180,18 +365,33 @@ export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
180
365
|
}>>;
|
|
181
366
|
testUrl: z.ZodOptional<z.ZodString>;
|
|
182
367
|
hostname: z.ZodString;
|
|
183
|
-
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
184
368
|
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
185
369
|
alpn: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
|
|
186
370
|
serverCertFingerprintSha256: z.ZodOptional<z.ZodString>;
|
|
187
371
|
type: z.ZodLiteral<NodeTypeEnum.Tuic>;
|
|
188
372
|
token: z.ZodString;
|
|
189
373
|
}, "strip", z.ZodTypeAny, {
|
|
374
|
+
port: string | number;
|
|
190
375
|
type: NodeTypeEnum.Tuic;
|
|
191
376
|
nodeName: string;
|
|
192
377
|
hostname: string;
|
|
193
|
-
port: string | number;
|
|
194
378
|
token: string;
|
|
379
|
+
surgeConfig?: {
|
|
380
|
+
resolveHostname?: boolean | undefined;
|
|
381
|
+
vmessAEAD?: boolean | undefined;
|
|
382
|
+
} | undefined;
|
|
383
|
+
surfboardConfig?: {
|
|
384
|
+
vmessAEAD?: boolean | undefined;
|
|
385
|
+
} | undefined;
|
|
386
|
+
quantumultXConfig?: {
|
|
387
|
+
vmessAEAD?: boolean | undefined;
|
|
388
|
+
} | undefined;
|
|
389
|
+
clashConfig?: {
|
|
390
|
+
enableTuic?: boolean | undefined;
|
|
391
|
+
enableShadowTls?: boolean | undefined;
|
|
392
|
+
enableHysteria2?: boolean | undefined;
|
|
393
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
394
|
+
} | undefined;
|
|
195
395
|
mptcp?: boolean | undefined;
|
|
196
396
|
tfo?: boolean | undefined;
|
|
197
397
|
underlyingProxy?: string | undefined;
|
|
@@ -209,11 +409,27 @@ export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
209
409
|
alpn?: [string, ...string[]] | undefined;
|
|
210
410
|
serverCertFingerprintSha256?: string | undefined;
|
|
211
411
|
}, {
|
|
412
|
+
port: string | number;
|
|
212
413
|
type: NodeTypeEnum.Tuic;
|
|
213
414
|
nodeName: string;
|
|
214
415
|
hostname: string;
|
|
215
|
-
port: string | number;
|
|
216
416
|
token: string;
|
|
417
|
+
surgeConfig?: {
|
|
418
|
+
resolveHostname?: boolean | undefined;
|
|
419
|
+
vmessAEAD?: boolean | undefined;
|
|
420
|
+
} | undefined;
|
|
421
|
+
surfboardConfig?: {
|
|
422
|
+
vmessAEAD?: boolean | undefined;
|
|
423
|
+
} | undefined;
|
|
424
|
+
quantumultXConfig?: {
|
|
425
|
+
vmessAEAD?: boolean | undefined;
|
|
426
|
+
} | undefined;
|
|
427
|
+
clashConfig?: {
|
|
428
|
+
enableTuic?: boolean | undefined;
|
|
429
|
+
enableShadowTls?: boolean | undefined;
|
|
430
|
+
enableHysteria2?: boolean | undefined;
|
|
431
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
432
|
+
} | undefined;
|
|
217
433
|
mptcp?: boolean | undefined;
|
|
218
434
|
tfo?: boolean | undefined;
|
|
219
435
|
underlyingProxy?: string | undefined;
|
|
@@ -231,6 +447,47 @@ export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
231
447
|
alpn?: [string, ...string[]] | undefined;
|
|
232
448
|
serverCertFingerprintSha256?: string | undefined;
|
|
233
449
|
}>, z.ZodObject<{
|
|
450
|
+
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
451
|
+
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
452
|
+
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
resolveHostname?: boolean | undefined;
|
|
456
|
+
vmessAEAD?: boolean | undefined;
|
|
457
|
+
}, {
|
|
458
|
+
resolveHostname?: boolean | undefined;
|
|
459
|
+
vmessAEAD?: boolean | undefined;
|
|
460
|
+
}>>;
|
|
461
|
+
surfboardConfig: z.ZodOptional<z.ZodObject<{
|
|
462
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
463
|
+
}, "strip", z.ZodTypeAny, {
|
|
464
|
+
vmessAEAD?: boolean | undefined;
|
|
465
|
+
}, {
|
|
466
|
+
vmessAEAD?: boolean | undefined;
|
|
467
|
+
}>>;
|
|
468
|
+
quantumultXConfig: z.ZodOptional<z.ZodObject<{
|
|
469
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
470
|
+
}, "strip", z.ZodTypeAny, {
|
|
471
|
+
vmessAEAD?: boolean | undefined;
|
|
472
|
+
}, {
|
|
473
|
+
vmessAEAD?: boolean | undefined;
|
|
474
|
+
}>>;
|
|
475
|
+
clashConfig: z.ZodOptional<z.ZodObject<{
|
|
476
|
+
enableTuic: z.ZodOptional<z.ZodBoolean>;
|
|
477
|
+
enableShadowTls: z.ZodOptional<z.ZodBoolean>;
|
|
478
|
+
enableHysteria2: z.ZodOptional<z.ZodBoolean>;
|
|
479
|
+
clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>;
|
|
480
|
+
}, "strip", z.ZodTypeAny, {
|
|
481
|
+
enableTuic?: boolean | undefined;
|
|
482
|
+
enableShadowTls?: boolean | undefined;
|
|
483
|
+
enableHysteria2?: boolean | undefined;
|
|
484
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
enableTuic?: boolean | undefined;
|
|
487
|
+
enableShadowTls?: boolean | undefined;
|
|
488
|
+
enableHysteria2?: boolean | undefined;
|
|
489
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
490
|
+
}>>;
|
|
234
491
|
mptcp: z.ZodOptional<z.ZodBoolean>;
|
|
235
492
|
tfo: z.ZodOptional<z.ZodBoolean>;
|
|
236
493
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
@@ -254,7 +511,6 @@ export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
254
511
|
}>>;
|
|
255
512
|
testUrl: z.ZodOptional<z.ZodString>;
|
|
256
513
|
hostname: z.ZodString;
|
|
257
|
-
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
258
514
|
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
259
515
|
alpn: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
|
|
260
516
|
serverCertFingerprintSha256: z.ZodOptional<z.ZodString>;
|
|
@@ -263,13 +519,29 @@ export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
263
519
|
uuid: z.ZodString;
|
|
264
520
|
version: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
265
521
|
}, "strip", z.ZodTypeAny, {
|
|
522
|
+
port: string | number;
|
|
266
523
|
type: NodeTypeEnum.Tuic;
|
|
267
524
|
password: string;
|
|
268
525
|
nodeName: string;
|
|
269
526
|
version: string | number;
|
|
270
527
|
hostname: string;
|
|
271
|
-
port: string | number;
|
|
272
528
|
uuid: string;
|
|
529
|
+
surgeConfig?: {
|
|
530
|
+
resolveHostname?: boolean | undefined;
|
|
531
|
+
vmessAEAD?: boolean | undefined;
|
|
532
|
+
} | undefined;
|
|
533
|
+
surfboardConfig?: {
|
|
534
|
+
vmessAEAD?: boolean | undefined;
|
|
535
|
+
} | undefined;
|
|
536
|
+
quantumultXConfig?: {
|
|
537
|
+
vmessAEAD?: boolean | undefined;
|
|
538
|
+
} | undefined;
|
|
539
|
+
clashConfig?: {
|
|
540
|
+
enableTuic?: boolean | undefined;
|
|
541
|
+
enableShadowTls?: boolean | undefined;
|
|
542
|
+
enableHysteria2?: boolean | undefined;
|
|
543
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
544
|
+
} | undefined;
|
|
273
545
|
mptcp?: boolean | undefined;
|
|
274
546
|
tfo?: boolean | undefined;
|
|
275
547
|
underlyingProxy?: string | undefined;
|
|
@@ -287,13 +559,29 @@ export declare const TuicNodeConfigValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
287
559
|
alpn?: [string, ...string[]] | undefined;
|
|
288
560
|
serverCertFingerprintSha256?: string | undefined;
|
|
289
561
|
}, {
|
|
562
|
+
port: string | number;
|
|
290
563
|
type: NodeTypeEnum.Tuic;
|
|
291
564
|
password: string;
|
|
292
565
|
nodeName: string;
|
|
293
566
|
version: string | number;
|
|
294
567
|
hostname: string;
|
|
295
|
-
port: string | number;
|
|
296
568
|
uuid: string;
|
|
569
|
+
surgeConfig?: {
|
|
570
|
+
resolveHostname?: boolean | undefined;
|
|
571
|
+
vmessAEAD?: boolean | undefined;
|
|
572
|
+
} | undefined;
|
|
573
|
+
surfboardConfig?: {
|
|
574
|
+
vmessAEAD?: boolean | undefined;
|
|
575
|
+
} | undefined;
|
|
576
|
+
quantumultXConfig?: {
|
|
577
|
+
vmessAEAD?: boolean | undefined;
|
|
578
|
+
} | undefined;
|
|
579
|
+
clashConfig?: {
|
|
580
|
+
enableTuic?: boolean | undefined;
|
|
581
|
+
enableShadowTls?: boolean | undefined;
|
|
582
|
+
enableHysteria2?: boolean | undefined;
|
|
583
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
584
|
+
} | undefined;
|
|
297
585
|
mptcp?: boolean | undefined;
|
|
298
586
|
tfo?: boolean | undefined;
|
|
299
587
|
underlyingProxy?: string | undefined;
|
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { NodeTypeEnum } from '../types';
|
|
3
3
|
export declare const VmessNodeConfigValidator: z.ZodObject<{
|
|
4
|
+
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
resolveHostname?: boolean | undefined;
|
|
9
|
+
vmessAEAD?: boolean | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
resolveHostname?: boolean | undefined;
|
|
12
|
+
vmessAEAD?: boolean | undefined;
|
|
13
|
+
}>>;
|
|
14
|
+
surfboardConfig: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
vmessAEAD?: boolean | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
vmessAEAD?: boolean | undefined;
|
|
20
|
+
}>>;
|
|
21
|
+
quantumultXConfig: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
vmessAEAD?: boolean | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
vmessAEAD?: boolean | undefined;
|
|
27
|
+
}>>;
|
|
28
|
+
clashConfig: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
enableTuic: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
enableShadowTls: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
enableHysteria2: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
enableTuic?: boolean | undefined;
|
|
35
|
+
enableShadowTls?: boolean | undefined;
|
|
36
|
+
enableHysteria2?: boolean | undefined;
|
|
37
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
enableTuic?: boolean | undefined;
|
|
40
|
+
enableShadowTls?: boolean | undefined;
|
|
41
|
+
enableHysteria2?: boolean | undefined;
|
|
42
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
43
|
+
}>>;
|
|
4
44
|
mptcp: z.ZodOptional<z.ZodBoolean>;
|
|
5
45
|
tfo: z.ZodOptional<z.ZodBoolean>;
|
|
6
46
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
@@ -37,15 +77,31 @@ export declare const VmessNodeConfigValidator: z.ZodObject<{
|
|
|
37
77
|
wsHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
38
78
|
serverCertFingerprintSha256: z.ZodOptional<z.ZodString>;
|
|
39
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
port: string | number;
|
|
40
81
|
type: NodeTypeEnum.Vmess;
|
|
41
82
|
nodeName: string;
|
|
42
83
|
hostname: string;
|
|
43
|
-
port: string | number;
|
|
44
84
|
method: "none" | "aes-128-gcm" | "chacha20-ietf-poly1305" | "auto";
|
|
45
85
|
tls: boolean;
|
|
46
86
|
uuid: string;
|
|
47
87
|
alterId: string | number;
|
|
48
88
|
network: "ws" | "tcp";
|
|
89
|
+
surgeConfig?: {
|
|
90
|
+
resolveHostname?: boolean | undefined;
|
|
91
|
+
vmessAEAD?: boolean | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
surfboardConfig?: {
|
|
94
|
+
vmessAEAD?: boolean | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
quantumultXConfig?: {
|
|
97
|
+
vmessAEAD?: boolean | undefined;
|
|
98
|
+
} | undefined;
|
|
99
|
+
clashConfig?: {
|
|
100
|
+
enableTuic?: boolean | undefined;
|
|
101
|
+
enableShadowTls?: boolean | undefined;
|
|
102
|
+
enableHysteria2?: boolean | undefined;
|
|
103
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
104
|
+
} | undefined;
|
|
49
105
|
mptcp?: boolean | undefined;
|
|
50
106
|
tfo?: boolean | undefined;
|
|
51
107
|
underlyingProxy?: string | undefined;
|
|
@@ -65,15 +121,31 @@ export declare const VmessNodeConfigValidator: z.ZodObject<{
|
|
|
65
121
|
wsHeaders?: Record<string, string> | undefined;
|
|
66
122
|
serverCertFingerprintSha256?: string | undefined;
|
|
67
123
|
}, {
|
|
124
|
+
port: string | number;
|
|
68
125
|
type: NodeTypeEnum.Vmess;
|
|
69
126
|
nodeName: string;
|
|
70
127
|
hostname: string;
|
|
71
|
-
port: string | number;
|
|
72
128
|
method: "none" | "aes-128-gcm" | "chacha20-ietf-poly1305" | "auto";
|
|
73
129
|
tls: boolean;
|
|
74
130
|
uuid: string;
|
|
75
131
|
alterId: string | number;
|
|
76
132
|
network: "ws" | "tcp";
|
|
133
|
+
surgeConfig?: {
|
|
134
|
+
resolveHostname?: boolean | undefined;
|
|
135
|
+
vmessAEAD?: boolean | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
surfboardConfig?: {
|
|
138
|
+
vmessAEAD?: boolean | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
quantumultXConfig?: {
|
|
141
|
+
vmessAEAD?: boolean | undefined;
|
|
142
|
+
} | undefined;
|
|
143
|
+
clashConfig?: {
|
|
144
|
+
enableTuic?: boolean | undefined;
|
|
145
|
+
enableShadowTls?: boolean | undefined;
|
|
146
|
+
enableHysteria2?: boolean | undefined;
|
|
147
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
148
|
+
} | undefined;
|
|
77
149
|
mptcp?: boolean | undefined;
|
|
78
150
|
tfo?: boolean | undefined;
|
|
79
151
|
underlyingProxy?: string | undefined;
|
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { NodeTypeEnum } from '../types';
|
|
3
3
|
export declare const WireguardNodeConfigValidator: z.ZodObject<{
|
|
4
|
+
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
resolveHostname?: boolean | undefined;
|
|
9
|
+
vmessAEAD?: boolean | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
resolveHostname?: boolean | undefined;
|
|
12
|
+
vmessAEAD?: boolean | undefined;
|
|
13
|
+
}>>;
|
|
14
|
+
surfboardConfig: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
vmessAEAD?: boolean | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
vmessAEAD?: boolean | undefined;
|
|
20
|
+
}>>;
|
|
21
|
+
quantumultXConfig: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
vmessAEAD?: boolean | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
vmessAEAD?: boolean | undefined;
|
|
27
|
+
}>>;
|
|
28
|
+
clashConfig: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
enableTuic: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
enableShadowTls: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
enableHysteria2: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
enableTuic?: boolean | undefined;
|
|
35
|
+
enableShadowTls?: boolean | undefined;
|
|
36
|
+
enableHysteria2?: boolean | undefined;
|
|
37
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
enableTuic?: boolean | undefined;
|
|
40
|
+
enableShadowTls?: boolean | undefined;
|
|
41
|
+
enableHysteria2?: boolean | undefined;
|
|
42
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
43
|
+
}>>;
|
|
4
44
|
mptcp: z.ZodOptional<z.ZodBoolean>;
|
|
5
45
|
tfo: z.ZodOptional<z.ZodBoolean>;
|
|
6
46
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
@@ -71,6 +111,22 @@ export declare const WireguardNodeConfigValidator: z.ZodObject<{
|
|
|
71
111
|
presharedKey?: string | undefined;
|
|
72
112
|
reservedBits?: number[] | undefined;
|
|
73
113
|
}[]];
|
|
114
|
+
surgeConfig?: {
|
|
115
|
+
resolveHostname?: boolean | undefined;
|
|
116
|
+
vmessAEAD?: boolean | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
surfboardConfig?: {
|
|
119
|
+
vmessAEAD?: boolean | undefined;
|
|
120
|
+
} | undefined;
|
|
121
|
+
quantumultXConfig?: {
|
|
122
|
+
vmessAEAD?: boolean | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
clashConfig?: {
|
|
125
|
+
enableTuic?: boolean | undefined;
|
|
126
|
+
enableShadowTls?: boolean | undefined;
|
|
127
|
+
enableHysteria2?: boolean | undefined;
|
|
128
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
129
|
+
} | undefined;
|
|
74
130
|
mptcp?: boolean | undefined;
|
|
75
131
|
tfo?: boolean | undefined;
|
|
76
132
|
underlyingProxy?: string | undefined;
|
|
@@ -107,6 +163,22 @@ export declare const WireguardNodeConfigValidator: z.ZodObject<{
|
|
|
107
163
|
presharedKey?: string | undefined;
|
|
108
164
|
reservedBits?: number[] | undefined;
|
|
109
165
|
}[]];
|
|
166
|
+
surgeConfig?: {
|
|
167
|
+
resolveHostname?: boolean | undefined;
|
|
168
|
+
vmessAEAD?: boolean | undefined;
|
|
169
|
+
} | undefined;
|
|
170
|
+
surfboardConfig?: {
|
|
171
|
+
vmessAEAD?: boolean | undefined;
|
|
172
|
+
} | undefined;
|
|
173
|
+
quantumultXConfig?: {
|
|
174
|
+
vmessAEAD?: boolean | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
clashConfig?: {
|
|
177
|
+
enableTuic?: boolean | undefined;
|
|
178
|
+
enableShadowTls?: boolean | undefined;
|
|
179
|
+
enableHysteria2?: boolean | undefined;
|
|
180
|
+
clashCore?: "clash" | "clash.meta" | "stash" | undefined;
|
|
181
|
+
} | undefined;
|
|
110
182
|
mptcp?: boolean | undefined;
|
|
111
183
|
tfo?: boolean | undefined;
|
|
112
184
|
underlyingProxy?: string | undefined;
|
|
@@ -4,11 +4,11 @@ const { basename } = require('path')
|
|
|
4
4
|
const { promises: fsp } = require('fs')
|
|
5
5
|
const _ = require('lodash')
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const { loadConfig } = require('../../../build/config')
|
|
8
8
|
|
|
9
9
|
module.exports = {
|
|
10
10
|
prompt: ({ prompter: inquirer }) => {
|
|
11
|
-
const config =
|
|
11
|
+
const config = loadConfig(process.cwd())
|
|
12
12
|
|
|
13
13
|
return inquirer.prompt([
|
|
14
14
|
{
|