surgio 3.6.5 → 3.7.0-beta.1
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/README.md +0 -1
- package/build/configurables.d.ts +2 -0
- package/build/generator/artifact.d.ts +11 -3
- package/build/generator/artifact.js +21 -11
- package/build/generator/artifact.js.map +1 -1
- package/build/generator/index.d.ts +1 -0
- package/build/generator/index.js +5 -0
- package/build/generator/index.js.map +1 -1
- package/build/generator/json-template.d.ts +10 -0
- package/build/generator/json-template.js +65 -0
- package/build/generator/json-template.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +4 -1
- package/build/index.js.map +1 -1
- package/build/provider/V2rayNSubscribeProvider.d.ts +1 -1
- package/build/provider/V2rayNSubscribeProvider.js.map +1 -1
- package/build/types.d.ts +4 -2
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/loon.js +5 -3
- package/build/utils/loon.js.map +1 -1
- package/build/utils/singbox.d.ts +3 -0
- package/build/utils/singbox.js +362 -0
- package/build/utils/singbox.js.map +1 -0
- package/build/utils/ss.d.ts +1 -0
- package/build/utils/ss.js +18 -1
- package/build/utils/ss.js.map +1 -1
- package/build/validators/artifact.d.ts +6 -0
- package/build/validators/artifact.js +8 -0
- package/build/validators/artifact.js.map +1 -1
- package/build/validators/common.d.ts +37 -0
- package/build/validators/common.js +14 -1
- package/build/validators/common.js.map +1 -1
- package/build/validators/http.d.ts +12 -0
- package/build/validators/http.js +4 -0
- package/build/validators/http.js.map +1 -1
- package/build/validators/shadowsocks.d.ts +62 -3
- package/build/validators/shadowsocks.js +2 -0
- package/build/validators/shadowsocks.js.map +1 -1
- package/build/validators/shadowsocksr.d.ts +2 -2
- package/build/validators/socks5.d.ts +20 -8
- package/build/validators/socks5.js +1 -5
- package/build/validators/socks5.js.map +1 -1
- package/build/validators/surgio-config.d.ts +10 -0
- package/build/validators/trojan.d.ts +59 -0
- package/build/validators/trojan.js +1 -0
- package/build/validators/trojan.js.map +1 -1
- package/build/validators/vless.d.ts +88 -3
- package/build/validators/vless.js +3 -0
- package/build/validators/vless.js.map +1 -1
- package/build/validators/vmess.d.ts +103 -4
- package/build/validators/vmess.js +14 -1
- package/build/validators/vmess.js.map +1 -1
- package/package.json +10 -9
|
@@ -71,13 +71,50 @@ export declare const ShadowsocksNodeConfigValidator: z.ZodObject<{
|
|
|
71
71
|
method: z.ZodString;
|
|
72
72
|
password: z.ZodString;
|
|
73
73
|
udpRelay: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
-
obfs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"tls">, z.ZodLiteral<"http">, z.ZodLiteral<"ws">, z.ZodLiteral<"wss">]>>;
|
|
74
|
+
obfs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"tls">, z.ZodLiteral<"http">, z.ZodLiteral<"ws">, z.ZodLiteral<"wss">, z.ZodLiteral<"quic">]>>;
|
|
75
75
|
obfsHost: z.ZodOptional<z.ZodString>;
|
|
76
76
|
obfsUri: z.ZodOptional<z.ZodString>;
|
|
77
77
|
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
78
78
|
wsHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
79
79
|
tls13: z.ZodOptional<z.ZodBoolean>;
|
|
80
80
|
mux: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
multiplex: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
protocol: z.ZodEnum<["smux", "yamux", "h2mux"]>;
|
|
83
|
+
maxConnections: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
minStreams: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
maxStreams: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
padding: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
brutal: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
upMbps: z.ZodNumber;
|
|
89
|
+
downMbps: z.ZodNumber;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
upMbps: number;
|
|
92
|
+
downMbps: number;
|
|
93
|
+
}, {
|
|
94
|
+
upMbps: number;
|
|
95
|
+
downMbps: number;
|
|
96
|
+
}>>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
99
|
+
maxConnections?: number | undefined;
|
|
100
|
+
minStreams?: number | undefined;
|
|
101
|
+
maxStreams?: number | undefined;
|
|
102
|
+
padding?: boolean | undefined;
|
|
103
|
+
brutal?: {
|
|
104
|
+
upMbps: number;
|
|
105
|
+
downMbps: number;
|
|
106
|
+
} | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
109
|
+
maxConnections?: number | undefined;
|
|
110
|
+
minStreams?: number | undefined;
|
|
111
|
+
maxStreams?: number | undefined;
|
|
112
|
+
padding?: boolean | undefined;
|
|
113
|
+
brutal?: {
|
|
114
|
+
upMbps: number;
|
|
115
|
+
downMbps: number;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}>>;
|
|
81
118
|
}, "strip", z.ZodTypeAny, {
|
|
82
119
|
port: string | number;
|
|
83
120
|
type: NodeTypeEnum.Shadowsocks;
|
|
@@ -115,13 +152,24 @@ export declare const ShadowsocksNodeConfigValidator: z.ZodObject<{
|
|
|
115
152
|
} | undefined;
|
|
116
153
|
testUrl?: string | undefined;
|
|
117
154
|
udpRelay?: boolean | undefined;
|
|
118
|
-
obfs?: "http" | "ws" | "tls" | "wss" | undefined;
|
|
155
|
+
obfs?: "http" | "ws" | "tls" | "wss" | "quic" | undefined;
|
|
119
156
|
obfsHost?: string | undefined;
|
|
120
157
|
obfsUri?: string | undefined;
|
|
121
158
|
skipCertVerify?: boolean | undefined;
|
|
122
159
|
wsHeaders?: Record<string, string> | undefined;
|
|
123
160
|
tls13?: boolean | undefined;
|
|
124
161
|
mux?: boolean | undefined;
|
|
162
|
+
multiplex?: {
|
|
163
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
164
|
+
maxConnections?: number | undefined;
|
|
165
|
+
minStreams?: number | undefined;
|
|
166
|
+
maxStreams?: number | undefined;
|
|
167
|
+
padding?: boolean | undefined;
|
|
168
|
+
brutal?: {
|
|
169
|
+
upMbps: number;
|
|
170
|
+
downMbps: number;
|
|
171
|
+
} | undefined;
|
|
172
|
+
} | undefined;
|
|
125
173
|
}, {
|
|
126
174
|
port: string | number;
|
|
127
175
|
type: NodeTypeEnum.Shadowsocks;
|
|
@@ -159,11 +207,22 @@ export declare const ShadowsocksNodeConfigValidator: z.ZodObject<{
|
|
|
159
207
|
} | undefined;
|
|
160
208
|
testUrl?: string | undefined;
|
|
161
209
|
udpRelay?: boolean | undefined;
|
|
162
|
-
obfs?: "http" | "ws" | "tls" | "wss" | undefined;
|
|
210
|
+
obfs?: "http" | "ws" | "tls" | "wss" | "quic" | undefined;
|
|
163
211
|
obfsHost?: string | undefined;
|
|
164
212
|
obfsUri?: string | undefined;
|
|
165
213
|
skipCertVerify?: boolean | undefined;
|
|
166
214
|
wsHeaders?: Record<string, string> | undefined;
|
|
167
215
|
tls13?: boolean | undefined;
|
|
168
216
|
mux?: boolean | undefined;
|
|
217
|
+
multiplex?: {
|
|
218
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
219
|
+
maxConnections?: number | undefined;
|
|
220
|
+
minStreams?: number | undefined;
|
|
221
|
+
maxStreams?: number | undefined;
|
|
222
|
+
padding?: boolean | undefined;
|
|
223
|
+
brutal?: {
|
|
224
|
+
upMbps: number;
|
|
225
|
+
downMbps: number;
|
|
226
|
+
} | undefined;
|
|
227
|
+
} | undefined;
|
|
169
228
|
}>;
|
|
@@ -17,6 +17,7 @@ exports.ShadowsocksNodeConfigValidator = common_1.SimpleNodeConfigValidator.exte
|
|
|
17
17
|
zod_1.z.literal('http'),
|
|
18
18
|
zod_1.z.literal('ws'),
|
|
19
19
|
zod_1.z.literal('wss'),
|
|
20
|
+
zod_1.z.literal('quic'),
|
|
20
21
|
])
|
|
21
22
|
.optional(),
|
|
22
23
|
obfsHost: zod_1.z.ostring(),
|
|
@@ -25,5 +26,6 @@ exports.ShadowsocksNodeConfigValidator = common_1.SimpleNodeConfigValidator.exte
|
|
|
25
26
|
wsHeaders: zod_1.z.record(zod_1.z.string()).optional(),
|
|
26
27
|
tls13: zod_1.z.oboolean(),
|
|
27
28
|
mux: zod_1.z.oboolean(),
|
|
29
|
+
multiplex: common_1.MultiplexValidator.optional(),
|
|
28
30
|
});
|
|
29
31
|
//# sourceMappingURL=shadowsocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadowsocks.js","sourceRoot":"","sources":["../../src/validators/shadowsocks.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"shadowsocks.js","sourceRoot":"","sources":["../../src/validators/shadowsocks.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,qCAIiB;AAEJ,QAAA,8BAA8B,GAAG,kCAAyB,CAAC,MAAM,CAAC;IAC7E,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAY,CAAC,WAAW,CAAC;IACzC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,sBAAa;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,OAAC,CAAC,QAAQ,EAAE;IACtB,IAAI,EAAE,OAAC;SACJ,KAAK,CAAC;QACL,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAChB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QACf,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAChB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;KAClB,CAAC;SACD,QAAQ,EAAE;IACb,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,cAAc,EAAE,OAAC,CAAC,QAAQ,EAAE;IAC5B,SAAS,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1C,KAAK,EAAE,OAAC,CAAC,QAAQ,EAAE;IACnB,GAAG,EAAE,OAAC,CAAC,QAAQ,EAAE;IACjB,SAAS,EAAE,2BAAkB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA"}
|
|
@@ -83,8 +83,8 @@ export declare const ShadowsocksrNodeConfigValidator: z.ZodObject<{
|
|
|
83
83
|
hostname: string;
|
|
84
84
|
method: string;
|
|
85
85
|
obfs: string;
|
|
86
|
-
obfsparam: string;
|
|
87
86
|
protocol: string;
|
|
87
|
+
obfsparam: string;
|
|
88
88
|
protoparam: string;
|
|
89
89
|
surgeConfig?: {
|
|
90
90
|
resolveHostname?: boolean | undefined;
|
|
@@ -124,8 +124,8 @@ export declare const ShadowsocksrNodeConfigValidator: z.ZodObject<{
|
|
|
124
124
|
hostname: string;
|
|
125
125
|
method: string;
|
|
126
126
|
obfs: string;
|
|
127
|
-
obfsparam: string;
|
|
128
127
|
protocol: string;
|
|
128
|
+
obfsparam: string;
|
|
129
129
|
protoparam: string;
|
|
130
130
|
surgeConfig?: {
|
|
131
131
|
resolveHostname?: boolean | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { NodeTypeEnum } from '../types';
|
|
3
3
|
export declare const Socks5NodeConfigValidator: z.ZodObject<{
|
|
4
|
+
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
4
5
|
surgeConfig: z.ZodOptional<z.ZodObject<{
|
|
5
6
|
resolveHostname: z.ZodOptional<z.ZodBoolean>;
|
|
6
7
|
vmessAEAD: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -49,8 +50,10 @@ export declare const Socks5NodeConfigValidator: z.ZodObject<{
|
|
|
49
50
|
ecn: z.ZodOptional<z.ZodBoolean>;
|
|
50
51
|
blockQuic: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"on">, z.ZodLiteral<"off">]>>;
|
|
51
52
|
underlyingProxy: z.ZodOptional<z.ZodString>;
|
|
53
|
+
tls13: z.ZodOptional<z.ZodBoolean>;
|
|
52
54
|
nodeName: z.ZodString;
|
|
53
55
|
enable: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
sni: z.ZodOptional<z.ZodString>;
|
|
54
57
|
shadowTls: z.ZodOptional<z.ZodObject<{
|
|
55
58
|
version: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>>;
|
|
56
59
|
password: z.ZodString;
|
|
@@ -65,15 +68,16 @@ export declare const Socks5NodeConfigValidator: z.ZodObject<{
|
|
|
65
68
|
version?: string | number | undefined;
|
|
66
69
|
}>>;
|
|
67
70
|
testUrl: z.ZodOptional<z.ZodString>;
|
|
68
|
-
type: z.ZodLiteral<NodeTypeEnum.Socks5>;
|
|
69
71
|
hostname: z.ZodString;
|
|
70
|
-
|
|
72
|
+
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
alpn: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
|
|
74
|
+
serverCertFingerprintSha256: z.ZodOptional<z.ZodString>;
|
|
75
|
+
clientFingerprint: z.ZodOptional<z.ZodString>;
|
|
76
|
+
type: z.ZodLiteral<NodeTypeEnum.Socks5>;
|
|
71
77
|
username: z.ZodOptional<z.ZodString>;
|
|
72
78
|
password: z.ZodOptional<z.ZodString>;
|
|
73
79
|
udpRelay: z.ZodOptional<z.ZodBoolean>;
|
|
74
80
|
tls: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
-
skipCertVerify: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
-
sni: z.ZodOptional<z.ZodString>;
|
|
77
81
|
clientCert: z.ZodOptional<z.ZodString>;
|
|
78
82
|
}, "strip", z.ZodTypeAny, {
|
|
79
83
|
port: string | number;
|
|
@@ -102,19 +106,23 @@ export declare const Socks5NodeConfigValidator: z.ZodObject<{
|
|
|
102
106
|
ecn?: boolean | undefined;
|
|
103
107
|
blockQuic?: "auto" | "on" | "off" | undefined;
|
|
104
108
|
underlyingProxy?: string | undefined;
|
|
109
|
+
tls13?: boolean | undefined;
|
|
105
110
|
enable?: boolean | undefined;
|
|
111
|
+
sni?: string | undefined;
|
|
106
112
|
shadowTls?: {
|
|
107
113
|
password: string;
|
|
108
114
|
sni: string;
|
|
109
115
|
version?: string | number | undefined;
|
|
110
116
|
} | undefined;
|
|
111
117
|
testUrl?: string | undefined;
|
|
118
|
+
skipCertVerify?: boolean | undefined;
|
|
119
|
+
alpn?: [string, ...string[]] | undefined;
|
|
120
|
+
serverCertFingerprintSha256?: string | undefined;
|
|
121
|
+
clientFingerprint?: string | undefined;
|
|
112
122
|
username?: string | undefined;
|
|
113
123
|
password?: string | undefined;
|
|
114
124
|
udpRelay?: boolean | undefined;
|
|
115
125
|
tls?: boolean | undefined;
|
|
116
|
-
skipCertVerify?: boolean | undefined;
|
|
117
|
-
sni?: string | undefined;
|
|
118
126
|
clientCert?: string | undefined;
|
|
119
127
|
}, {
|
|
120
128
|
port: string | number;
|
|
@@ -143,18 +151,22 @@ export declare const Socks5NodeConfigValidator: z.ZodObject<{
|
|
|
143
151
|
ecn?: boolean | undefined;
|
|
144
152
|
blockQuic?: "auto" | "on" | "off" | undefined;
|
|
145
153
|
underlyingProxy?: string | undefined;
|
|
154
|
+
tls13?: boolean | undefined;
|
|
146
155
|
enable?: boolean | undefined;
|
|
156
|
+
sni?: string | undefined;
|
|
147
157
|
shadowTls?: {
|
|
148
158
|
password: string;
|
|
149
159
|
sni: string;
|
|
150
160
|
version?: string | number | undefined;
|
|
151
161
|
} | undefined;
|
|
152
162
|
testUrl?: string | undefined;
|
|
163
|
+
skipCertVerify?: boolean | undefined;
|
|
164
|
+
alpn?: [string, ...string[]] | undefined;
|
|
165
|
+
serverCertFingerprintSha256?: string | undefined;
|
|
166
|
+
clientFingerprint?: string | undefined;
|
|
153
167
|
username?: string | undefined;
|
|
154
168
|
password?: string | undefined;
|
|
155
169
|
udpRelay?: boolean | undefined;
|
|
156
170
|
tls?: boolean | undefined;
|
|
157
|
-
skipCertVerify?: boolean | undefined;
|
|
158
|
-
sni?: string | undefined;
|
|
159
171
|
clientCert?: string | undefined;
|
|
160
172
|
}>;
|
|
@@ -4,16 +4,12 @@ exports.Socks5NodeConfigValidator = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const types_1 = require("../types");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
|
-
exports.Socks5NodeConfigValidator = common_1.
|
|
7
|
+
exports.Socks5NodeConfigValidator = common_1.TlsNodeConfigValidator.extend({
|
|
8
8
|
type: zod_1.z.literal(types_1.NodeTypeEnum.Socks5),
|
|
9
|
-
hostname: zod_1.z.string(),
|
|
10
|
-
port: common_1.PortValidator,
|
|
11
9
|
username: zod_1.z.ostring(),
|
|
12
10
|
password: zod_1.z.ostring(),
|
|
13
11
|
udpRelay: zod_1.z.oboolean(),
|
|
14
12
|
tls: zod_1.z.oboolean(),
|
|
15
|
-
skipCertVerify: zod_1.z.oboolean(),
|
|
16
|
-
sni: zod_1.z.ostring(),
|
|
17
13
|
clientCert: zod_1.z.ostring(),
|
|
18
14
|
});
|
|
19
15
|
//# sourceMappingURL=socks5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socks5.js","sourceRoot":"","sources":["../../src/validators/socks5.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"socks5.js","sourceRoot":"","sources":["../../src/validators/socks5.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,qCAAiD;AAEpC,QAAA,yBAAyB,GAAG,+BAAsB,CAAC,MAAM,CAAC;IACrE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAY,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,QAAQ,EAAE;IACtB,GAAG,EAAE,OAAC,CAAC,QAAQ,EAAE;IACjB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAA"}
|
|
@@ -60,6 +60,8 @@ export declare const SurgioConfigValidator: z.ZodObject<{
|
|
|
60
60
|
artifacts: z.ZodArray<z.ZodObject<{
|
|
61
61
|
name: z.ZodString;
|
|
62
62
|
template: z.ZodString;
|
|
63
|
+
templateType: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"default">, z.ZodLiteral<"json">]>>;
|
|
64
|
+
extendTemplate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodUnknown>>;
|
|
63
65
|
provider: z.ZodString;
|
|
64
66
|
categories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
65
67
|
combineProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -72,7 +74,9 @@ export declare const SurgioConfigValidator: z.ZodObject<{
|
|
|
72
74
|
}, "strip", z.ZodTypeAny, {
|
|
73
75
|
name: string;
|
|
74
76
|
template: string;
|
|
77
|
+
templateType: "default" | "json";
|
|
75
78
|
provider: string;
|
|
79
|
+
extendTemplate?: ((args_0: unknown, ...args_1: unknown[]) => unknown) | undefined;
|
|
76
80
|
categories?: string[] | undefined;
|
|
77
81
|
combineProviders?: string[] | undefined;
|
|
78
82
|
customParams?: Record<string, any> | undefined;
|
|
@@ -85,6 +89,8 @@ export declare const SurgioConfigValidator: z.ZodObject<{
|
|
|
85
89
|
name: string;
|
|
86
90
|
template: string;
|
|
87
91
|
provider: string;
|
|
92
|
+
templateType?: "default" | "json" | undefined;
|
|
93
|
+
extendTemplate?: ((args_0: unknown, ...args_1: unknown[]) => unknown) | undefined;
|
|
88
94
|
categories?: string[] | undefined;
|
|
89
95
|
combineProviders?: string[] | undefined;
|
|
90
96
|
customParams?: Record<string, any> | undefined;
|
|
@@ -231,7 +237,9 @@ export declare const SurgioConfigValidator: z.ZodObject<{
|
|
|
231
237
|
artifacts: {
|
|
232
238
|
name: string;
|
|
233
239
|
template: string;
|
|
240
|
+
templateType: "default" | "json";
|
|
234
241
|
provider: string;
|
|
242
|
+
extendTemplate?: ((args_0: unknown, ...args_1: unknown[]) => unknown) | undefined;
|
|
235
243
|
categories?: string[] | undefined;
|
|
236
244
|
combineProviders?: string[] | undefined;
|
|
237
245
|
customParams?: Record<string, any> | undefined;
|
|
@@ -304,6 +312,8 @@ export declare const SurgioConfigValidator: z.ZodObject<{
|
|
|
304
312
|
name: string;
|
|
305
313
|
template: string;
|
|
306
314
|
provider: string;
|
|
315
|
+
templateType?: "default" | "json" | undefined;
|
|
316
|
+
extendTemplate?: ((args_0: unknown, ...args_1: unknown[]) => unknown) | undefined;
|
|
307
317
|
categories?: string[] | undefined;
|
|
308
318
|
combineProviders?: string[] | undefined;
|
|
309
319
|
customParams?: Record<string, any> | undefined;
|
|
@@ -79,6 +79,43 @@ export declare const TrojanNodeConfigValidator: z.ZodObject<{
|
|
|
79
79
|
network: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"tcp">, z.ZodLiteral<"ws">]>>;
|
|
80
80
|
wsPath: z.ZodOptional<z.ZodString>;
|
|
81
81
|
wsHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
82
|
+
multiplex: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
protocol: z.ZodEnum<["smux", "yamux", "h2mux"]>;
|
|
84
|
+
maxConnections: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
minStreams: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
maxStreams: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
padding: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
brutal: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
upMbps: z.ZodNumber;
|
|
90
|
+
downMbps: z.ZodNumber;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
upMbps: number;
|
|
93
|
+
downMbps: number;
|
|
94
|
+
}, {
|
|
95
|
+
upMbps: number;
|
|
96
|
+
downMbps: number;
|
|
97
|
+
}>>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
100
|
+
maxConnections?: number | undefined;
|
|
101
|
+
minStreams?: number | undefined;
|
|
102
|
+
maxStreams?: number | undefined;
|
|
103
|
+
padding?: boolean | undefined;
|
|
104
|
+
brutal?: {
|
|
105
|
+
upMbps: number;
|
|
106
|
+
downMbps: number;
|
|
107
|
+
} | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
110
|
+
maxConnections?: number | undefined;
|
|
111
|
+
minStreams?: number | undefined;
|
|
112
|
+
maxStreams?: number | undefined;
|
|
113
|
+
padding?: boolean | undefined;
|
|
114
|
+
brutal?: {
|
|
115
|
+
upMbps: number;
|
|
116
|
+
downMbps: number;
|
|
117
|
+
} | undefined;
|
|
118
|
+
}>>;
|
|
82
119
|
}, "strip", z.ZodTypeAny, {
|
|
83
120
|
port: string | number;
|
|
84
121
|
type: NodeTypeEnum.Trojan;
|
|
@@ -124,6 +161,17 @@ export declare const TrojanNodeConfigValidator: z.ZodObject<{
|
|
|
124
161
|
network?: "tcp" | "ws" | undefined;
|
|
125
162
|
wsPath?: string | undefined;
|
|
126
163
|
wsHeaders?: Record<string, string> | undefined;
|
|
164
|
+
multiplex?: {
|
|
165
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
166
|
+
maxConnections?: number | undefined;
|
|
167
|
+
minStreams?: number | undefined;
|
|
168
|
+
maxStreams?: number | undefined;
|
|
169
|
+
padding?: boolean | undefined;
|
|
170
|
+
brutal?: {
|
|
171
|
+
upMbps: number;
|
|
172
|
+
downMbps: number;
|
|
173
|
+
} | undefined;
|
|
174
|
+
} | undefined;
|
|
127
175
|
}, {
|
|
128
176
|
port: string | number;
|
|
129
177
|
type: NodeTypeEnum.Trojan;
|
|
@@ -169,4 +217,15 @@ export declare const TrojanNodeConfigValidator: z.ZodObject<{
|
|
|
169
217
|
network?: "tcp" | "ws" | undefined;
|
|
170
218
|
wsPath?: string | undefined;
|
|
171
219
|
wsHeaders?: Record<string, string> | undefined;
|
|
220
|
+
multiplex?: {
|
|
221
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
222
|
+
maxConnections?: number | undefined;
|
|
223
|
+
minStreams?: number | undefined;
|
|
224
|
+
maxStreams?: number | undefined;
|
|
225
|
+
padding?: boolean | undefined;
|
|
226
|
+
brutal?: {
|
|
227
|
+
upMbps: number;
|
|
228
|
+
downMbps: number;
|
|
229
|
+
} | undefined;
|
|
230
|
+
} | undefined;
|
|
172
231
|
}>;
|
|
@@ -11,5 +11,6 @@ exports.TrojanNodeConfigValidator = common_1.TlsNodeConfigValidator.extend({
|
|
|
11
11
|
network: zod_1.z.union([zod_1.z.literal('tcp'), zod_1.z.literal('ws')]).optional(),
|
|
12
12
|
wsPath: zod_1.z.ostring(),
|
|
13
13
|
wsHeaders: zod_1.z.record(zod_1.z.string()).optional(),
|
|
14
|
+
multiplex: common_1.MultiplexValidator.optional(),
|
|
14
15
|
});
|
|
15
16
|
//# sourceMappingURL=trojan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trojan.js","sourceRoot":"","sources":["../../src/validators/trojan.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"trojan.js","sourceRoot":"","sources":["../../src/validators/trojan.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,qCAAqE;AAExD,QAAA,yBAAyB,GAAG,+BAAsB,CAAC,MAAM,CAAC;IACrE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAY,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,OAAC,CAAC,QAAQ,EAAE;IACtB,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChE,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE1C,SAAS,EAAE,2BAAkB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA"}
|
|
@@ -89,7 +89,7 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
89
89
|
port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>;
|
|
90
90
|
method: z.ZodLiteral<"none">;
|
|
91
91
|
uuid: z.ZodString;
|
|
92
|
-
network: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"tcp">, z.ZodLiteral<"ws">, z.ZodLiteral<"h2">, z.ZodLiteral<"http">, z.ZodLiteral<"grpc">]>>;
|
|
92
|
+
network: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"tcp">, z.ZodLiteral<"ws">, z.ZodLiteral<"h2">, z.ZodLiteral<"http">, z.ZodLiteral<"grpc">, z.ZodLiteral<"quic">, z.ZodLiteral<"httpupgrade">]>>;
|
|
93
93
|
udpRelay: z.ZodOptional<z.ZodBoolean>;
|
|
94
94
|
flow: z.ZodOptional<z.ZodString>;
|
|
95
95
|
wsOpts: z.ZodOptional<z.ZodObject<{
|
|
@@ -132,6 +132,20 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
132
132
|
}, {
|
|
133
133
|
serviceName: string;
|
|
134
134
|
}>>;
|
|
135
|
+
quicOpts: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
136
|
+
httpUpgradeOpts: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
path: z.ZodString;
|
|
138
|
+
host: z.ZodOptional<z.ZodString>;
|
|
139
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
path: string;
|
|
142
|
+
host?: string | undefined;
|
|
143
|
+
headers?: Record<string, string> | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
path: string;
|
|
146
|
+
host?: string | undefined;
|
|
147
|
+
headers?: Record<string, string> | undefined;
|
|
148
|
+
}>>;
|
|
135
149
|
realityOpts: z.ZodOptional<z.ZodObject<{
|
|
136
150
|
publicKey: z.ZodString;
|
|
137
151
|
shortId: z.ZodOptional<z.ZodString>;
|
|
@@ -145,6 +159,43 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
145
159
|
shortId?: string | undefined;
|
|
146
160
|
spiderX?: string | undefined;
|
|
147
161
|
}>>;
|
|
162
|
+
multiplex: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
protocol: z.ZodEnum<["smux", "yamux", "h2mux"]>;
|
|
164
|
+
maxConnections: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
minStreams: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
maxStreams: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
padding: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
brutal: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
upMbps: z.ZodNumber;
|
|
170
|
+
downMbps: z.ZodNumber;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
upMbps: number;
|
|
173
|
+
downMbps: number;
|
|
174
|
+
}, {
|
|
175
|
+
upMbps: number;
|
|
176
|
+
downMbps: number;
|
|
177
|
+
}>>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
180
|
+
maxConnections?: number | undefined;
|
|
181
|
+
minStreams?: number | undefined;
|
|
182
|
+
maxStreams?: number | undefined;
|
|
183
|
+
padding?: boolean | undefined;
|
|
184
|
+
brutal?: {
|
|
185
|
+
upMbps: number;
|
|
186
|
+
downMbps: number;
|
|
187
|
+
} | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
190
|
+
maxConnections?: number | undefined;
|
|
191
|
+
minStreams?: number | undefined;
|
|
192
|
+
maxStreams?: number | undefined;
|
|
193
|
+
padding?: boolean | undefined;
|
|
194
|
+
brutal?: {
|
|
195
|
+
upMbps: number;
|
|
196
|
+
downMbps: number;
|
|
197
|
+
} | undefined;
|
|
198
|
+
}>>;
|
|
148
199
|
}, "strip", z.ZodTypeAny, {
|
|
149
200
|
port: string | number;
|
|
150
201
|
type: NodeTypeEnum.Vless;
|
|
@@ -152,7 +203,7 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
152
203
|
hostname: string;
|
|
153
204
|
method: "none";
|
|
154
205
|
uuid: string;
|
|
155
|
-
network: "tcp" | "http" | "ws" | "h2" | "grpc";
|
|
206
|
+
network: "tcp" | "http" | "ws" | "h2" | "grpc" | "quic" | "httpupgrade";
|
|
156
207
|
surgeConfig?: {
|
|
157
208
|
resolveHostname?: boolean | undefined;
|
|
158
209
|
vmessAEAD?: boolean | undefined;
|
|
@@ -206,11 +257,28 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
206
257
|
grpcOpts?: {
|
|
207
258
|
serviceName: string;
|
|
208
259
|
} | undefined;
|
|
260
|
+
quicOpts?: {} | undefined;
|
|
261
|
+
httpUpgradeOpts?: {
|
|
262
|
+
path: string;
|
|
263
|
+
host?: string | undefined;
|
|
264
|
+
headers?: Record<string, string> | undefined;
|
|
265
|
+
} | undefined;
|
|
209
266
|
realityOpts?: {
|
|
210
267
|
publicKey: string;
|
|
211
268
|
shortId?: string | undefined;
|
|
212
269
|
spiderX?: string | undefined;
|
|
213
270
|
} | undefined;
|
|
271
|
+
multiplex?: {
|
|
272
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
273
|
+
maxConnections?: number | undefined;
|
|
274
|
+
minStreams?: number | undefined;
|
|
275
|
+
maxStreams?: number | undefined;
|
|
276
|
+
padding?: boolean | undefined;
|
|
277
|
+
brutal?: {
|
|
278
|
+
upMbps: number;
|
|
279
|
+
downMbps: number;
|
|
280
|
+
} | undefined;
|
|
281
|
+
} | undefined;
|
|
214
282
|
}, {
|
|
215
283
|
port: string | number;
|
|
216
284
|
type: NodeTypeEnum.Vless;
|
|
@@ -253,7 +321,7 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
253
321
|
alpn?: [string, ...string[]] | undefined;
|
|
254
322
|
serverCertFingerprintSha256?: string | undefined;
|
|
255
323
|
clientFingerprint?: string | undefined;
|
|
256
|
-
network?: "tcp" | "http" | "ws" | "h2" | "grpc" | undefined;
|
|
324
|
+
network?: "tcp" | "http" | "ws" | "h2" | "grpc" | "quic" | "httpupgrade" | undefined;
|
|
257
325
|
udpRelay?: boolean | undefined;
|
|
258
326
|
flow?: string | undefined;
|
|
259
327
|
wsOpts?: {
|
|
@@ -272,9 +340,26 @@ export declare const VlessNodeConfigValidator: z.ZodObject<{
|
|
|
272
340
|
grpcOpts?: {
|
|
273
341
|
serviceName: string;
|
|
274
342
|
} | undefined;
|
|
343
|
+
quicOpts?: {} | undefined;
|
|
344
|
+
httpUpgradeOpts?: {
|
|
345
|
+
path: string;
|
|
346
|
+
host?: string | undefined;
|
|
347
|
+
headers?: Record<string, string> | undefined;
|
|
348
|
+
} | undefined;
|
|
275
349
|
realityOpts?: {
|
|
276
350
|
publicKey: string;
|
|
277
351
|
shortId?: string | undefined;
|
|
278
352
|
spiderX?: string | undefined;
|
|
279
353
|
} | undefined;
|
|
354
|
+
multiplex?: {
|
|
355
|
+
protocol: "smux" | "yamux" | "h2mux";
|
|
356
|
+
maxConnections?: number | undefined;
|
|
357
|
+
minStreams?: number | undefined;
|
|
358
|
+
maxStreams?: number | undefined;
|
|
359
|
+
padding?: boolean | undefined;
|
|
360
|
+
brutal?: {
|
|
361
|
+
upMbps: number;
|
|
362
|
+
downMbps: number;
|
|
363
|
+
} | undefined;
|
|
364
|
+
} | undefined;
|
|
280
365
|
}>;
|
|
@@ -23,6 +23,9 @@ exports.VlessNodeConfigValidator = common_1.TlsNodeConfigValidator.extend({
|
|
|
23
23
|
h2Opts: vmess_1.VmessH2OptsValidator.optional(),
|
|
24
24
|
httpOpts: vmess_1.VmessHttpOptsValidator.optional(),
|
|
25
25
|
grpcOpts: vmess_1.VmessGRPCOptsValidator.optional(),
|
|
26
|
+
quicOpts: vmess_1.VmessQuicOptsValidator.optional(),
|
|
27
|
+
httpUpgradeOpts: vmess_1.VmessHttpUpgradeOptsValidator.optional(),
|
|
26
28
|
realityOpts: exports.VlessRealityOptsValidator.optional(),
|
|
29
|
+
multiplex: common_1.MultiplexValidator.optional(),
|
|
27
30
|
});
|
|
28
31
|
//# sourceMappingURL=vless.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vless.js","sourceRoot":"","sources":["../../src/validators/vless.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"vless.js","sourceRoot":"","sources":["../../src/validators/vless.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,oCAAuC;AACvC,qCAIiB;AACjB,mCAQgB;AAEH,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAA;AAEW,QAAA,wBAAwB,GAAG,+BAAsB,CAAC,MAAM,CAAC;IACpE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAY,CAAC,KAAK,CAAC;IACnC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,sBAAa;IACnB,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvB,OAAO,EAAE,6BAAqB,CAAC,OAAO,CAAC,KAAK,CAAC;IAC7C,QAAQ,EAAE,OAAC,CAAC,QAAQ,EAAE;IACtB,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE;IAEjB,MAAM,EAAE,4BAAoB,CAAC,QAAQ,EAAE;IACvC,MAAM,EAAE,4BAAoB,CAAC,QAAQ,EAAE;IACvC,QAAQ,EAAE,8BAAsB,CAAC,QAAQ,EAAE;IAC3C,QAAQ,EAAE,8BAAsB,CAAC,QAAQ,EAAE;IAC3C,QAAQ,EAAE,8BAAsB,CAAC,QAAQ,EAAE;IAC3C,eAAe,EAAE,qCAA6B,CAAC,QAAQ,EAAE;IACzD,WAAW,EAAE,iCAAyB,CAAC,QAAQ,EAAE;IAEjD,SAAS,EAAE,2BAAkB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA"}
|