@remnawave/backend-contract 2.6.54 → 2.6.55
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/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +20 -20
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts +20 -20
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +878 -348
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.js +2 -59
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/resolved-proxy-config.schema.d.ts +1422 -0
- package/build/backend/models/resolved-proxy-config.schema.d.ts.map +1 -0
- package/build/backend/models/resolved-proxy-config.schema.js +219 -0
- package/build/backend/models/torrent-blocker-report.schema.d.ts +12 -12
- package/build/backend/models/webhook/webhook.schema.d.ts +32 -32
- package/build/frontend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.js +2 -59
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/resolved-proxy-config.schema.js +219 -0
- package/package.json +1 -1
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResolvedProxyConfigSchema = exports.ProxyEntryMetadataSchema = exports.SecurityVariantSchema = exports.TransportVariantSchema = exports.ProtocolVariantSchema = exports.RealitySecurityOptionsSchema = exports.TlsSecurityOptionsSchema = exports.HysteriaTransportOptionsSchema = exports.HysteriaProtocolOptionsSchema = exports.KcpTransportOptionsSchema = exports.GrpcTransportOptionsSchema = exports.HttpUpgradeTransportOptionsSchema = exports.WsTransportOptionsSchema = exports.XhttpTransportOptionsSchema = exports.TcpTransportOptionsSchema = exports.ShadowsocksProtocolOptionsSchema = exports.TrojanProtocolOptionsSchema = exports.VlessProtocolOptionsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
exports.VlessProtocolOptionsSchema = zod_1.z.object({
|
|
7
|
+
encryption: zod_1.z.string(),
|
|
8
|
+
id: zod_1.z.string(),
|
|
9
|
+
flow: zod_1.z.enum(['', 'xtls-rprx-vision', 'xtls-rprx-vision-udp443']),
|
|
10
|
+
});
|
|
11
|
+
exports.TrojanProtocolOptionsSchema = zod_1.z.object({
|
|
12
|
+
password: zod_1.z.string(),
|
|
13
|
+
});
|
|
14
|
+
exports.ShadowsocksProtocolOptionsSchema = zod_1.z.object({
|
|
15
|
+
method: zod_1.z.string(),
|
|
16
|
+
password: zod_1.z.string(),
|
|
17
|
+
uot: zod_1.z.boolean(),
|
|
18
|
+
uotVersion: zod_1.z.number().int(),
|
|
19
|
+
});
|
|
20
|
+
const TcpHeaderNoneSchema = zod_1.z.object({
|
|
21
|
+
type: zod_1.z.literal('none'),
|
|
22
|
+
});
|
|
23
|
+
const TcpHeaderHttpRequestSchema = zod_1.z.object({
|
|
24
|
+
version: zod_1.z.string().optional(),
|
|
25
|
+
method: zod_1.z.string().optional(),
|
|
26
|
+
path: zod_1.z.array(zod_1.z.string()).optional(),
|
|
27
|
+
headers: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
28
|
+
});
|
|
29
|
+
const TcpHeaderHttpResponseSchema = zod_1.z.object({
|
|
30
|
+
version: zod_1.z.string().optional(),
|
|
31
|
+
status: zod_1.z.string().optional(),
|
|
32
|
+
reason: zod_1.z.string().optional(),
|
|
33
|
+
headers: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
34
|
+
});
|
|
35
|
+
const TcpHeaderHttpSchema = zod_1.z.object({
|
|
36
|
+
type: zod_1.z.literal('http'),
|
|
37
|
+
request: TcpHeaderHttpRequestSchema.optional(),
|
|
38
|
+
response: TcpHeaderHttpResponseSchema.optional(),
|
|
39
|
+
});
|
|
40
|
+
const TcpHeaderSchema = zod_1.z.discriminatedUnion('type', [TcpHeaderNoneSchema, TcpHeaderHttpSchema]);
|
|
41
|
+
exports.TcpTransportOptionsSchema = zod_1.z.object({
|
|
42
|
+
header: TcpHeaderSchema.nullable(),
|
|
43
|
+
});
|
|
44
|
+
exports.XhttpTransportOptionsSchema = zod_1.z.object({
|
|
45
|
+
path: zod_1.z.string().nullable(),
|
|
46
|
+
host: zod_1.z.string().nullable(),
|
|
47
|
+
mode: zod_1.z.enum(['auto', 'packet-up', 'stream-up', 'stream-one']),
|
|
48
|
+
extra: zod_1.z.record(zod_1.z.unknown()).nullable(),
|
|
49
|
+
});
|
|
50
|
+
exports.WsTransportOptionsSchema = zod_1.z.object({
|
|
51
|
+
path: zod_1.z.string().nullable(),
|
|
52
|
+
host: zod_1.z.string().nullable(),
|
|
53
|
+
headers: zod_1.z.record(zod_1.z.string()).nullable(),
|
|
54
|
+
heartbeatPeriod: zod_1.z.number().nullable(),
|
|
55
|
+
});
|
|
56
|
+
exports.HttpUpgradeTransportOptionsSchema = zod_1.z.object({
|
|
57
|
+
path: zod_1.z.string().nullable(),
|
|
58
|
+
host: zod_1.z.string().nullable(),
|
|
59
|
+
headers: zod_1.z.record(zod_1.z.string()).nullable(),
|
|
60
|
+
});
|
|
61
|
+
exports.GrpcTransportOptionsSchema = zod_1.z.object({
|
|
62
|
+
authority: zod_1.z.string().nullable(),
|
|
63
|
+
serviceName: zod_1.z.string().nullable(),
|
|
64
|
+
multiMode: zod_1.z.boolean(),
|
|
65
|
+
});
|
|
66
|
+
exports.KcpTransportOptionsSchema = zod_1.z.object({
|
|
67
|
+
clientMtu: zod_1.z.number().int(),
|
|
68
|
+
tti: zod_1.z.number().int(),
|
|
69
|
+
congestion: zod_1.z.boolean(),
|
|
70
|
+
});
|
|
71
|
+
exports.HysteriaProtocolOptionsSchema = zod_1.z.object({
|
|
72
|
+
version: zod_1.z.number().int(),
|
|
73
|
+
});
|
|
74
|
+
exports.HysteriaTransportOptionsSchema = zod_1.z.object({
|
|
75
|
+
version: zod_1.z.number().int(),
|
|
76
|
+
auth: zod_1.z.string(),
|
|
77
|
+
});
|
|
78
|
+
exports.TlsSecurityOptionsSchema = zod_1.z.object({
|
|
79
|
+
allowInsecure: zod_1.z.boolean(),
|
|
80
|
+
alpn: zod_1.z.string().nullable(),
|
|
81
|
+
enableSessionResumption: zod_1.z.boolean(),
|
|
82
|
+
fingerprint: zod_1.z.string().nullable(),
|
|
83
|
+
serverName: zod_1.z.string().nullable(),
|
|
84
|
+
echConfigList: zod_1.z.string().nullable(),
|
|
85
|
+
echForceQuery: zod_1.z.string().nullable(),
|
|
86
|
+
});
|
|
87
|
+
exports.RealitySecurityOptionsSchema = zod_1.z.object({
|
|
88
|
+
fingerprint: zod_1.z.string(),
|
|
89
|
+
publicKey: zod_1.z.string(),
|
|
90
|
+
shortId: zod_1.z.string().nullable(),
|
|
91
|
+
serverName: zod_1.z.string(),
|
|
92
|
+
spiderX: zod_1.z.string().nullable(),
|
|
93
|
+
mldsa65Verify: zod_1.z.string().nullable(),
|
|
94
|
+
});
|
|
95
|
+
const VlessProtocolSchema = zod_1.z.object({
|
|
96
|
+
protocol: zod_1.z.literal('vless'),
|
|
97
|
+
protocolOptions: exports.VlessProtocolOptionsSchema,
|
|
98
|
+
});
|
|
99
|
+
const TrojanProtocolSchema = zod_1.z.object({
|
|
100
|
+
protocol: zod_1.z.literal('trojan'),
|
|
101
|
+
protocolOptions: exports.TrojanProtocolOptionsSchema,
|
|
102
|
+
});
|
|
103
|
+
const ShadowsocksProtocolSchema = zod_1.z.object({
|
|
104
|
+
protocol: zod_1.z.literal('shadowsocks'),
|
|
105
|
+
protocolOptions: exports.ShadowsocksProtocolOptionsSchema,
|
|
106
|
+
});
|
|
107
|
+
const HysteriaProtocolSchema = zod_1.z.object({
|
|
108
|
+
protocol: zod_1.z.literal('hysteria'),
|
|
109
|
+
protocolOptions: exports.HysteriaProtocolOptionsSchema,
|
|
110
|
+
});
|
|
111
|
+
exports.ProtocolVariantSchema = zod_1.z.discriminatedUnion('protocol', [
|
|
112
|
+
VlessProtocolSchema,
|
|
113
|
+
TrojanProtocolSchema,
|
|
114
|
+
ShadowsocksProtocolSchema,
|
|
115
|
+
HysteriaProtocolSchema,
|
|
116
|
+
]);
|
|
117
|
+
const TcpTransportSchema = zod_1.z.object({
|
|
118
|
+
transport: zod_1.z.literal('tcp'),
|
|
119
|
+
transportOptions: exports.TcpTransportOptionsSchema,
|
|
120
|
+
});
|
|
121
|
+
const XHttpTransportSchema = zod_1.z.object({
|
|
122
|
+
transport: zod_1.z.literal('xhttp'),
|
|
123
|
+
transportOptions: exports.XhttpTransportOptionsSchema,
|
|
124
|
+
});
|
|
125
|
+
const WsTransportSchema = zod_1.z.object({
|
|
126
|
+
transport: zod_1.z.literal('ws'),
|
|
127
|
+
transportOptions: exports.WsTransportOptionsSchema,
|
|
128
|
+
});
|
|
129
|
+
const HttpUpgradeTransportSchema = zod_1.z.object({
|
|
130
|
+
transport: zod_1.z.literal('httpupgrade'),
|
|
131
|
+
transportOptions: exports.HttpUpgradeTransportOptionsSchema,
|
|
132
|
+
});
|
|
133
|
+
const GrpcTransportSchema = zod_1.z.object({
|
|
134
|
+
transport: zod_1.z.literal('grpc'),
|
|
135
|
+
transportOptions: exports.GrpcTransportOptionsSchema,
|
|
136
|
+
});
|
|
137
|
+
const KcpTransportSchema = zod_1.z.object({
|
|
138
|
+
transport: zod_1.z.literal('kcp'),
|
|
139
|
+
transportOptions: exports.KcpTransportOptionsSchema,
|
|
140
|
+
});
|
|
141
|
+
const HysteriaTransportSchema = zod_1.z.object({
|
|
142
|
+
transport: zod_1.z.literal('hysteria'),
|
|
143
|
+
transportOptions: exports.HysteriaTransportOptionsSchema,
|
|
144
|
+
});
|
|
145
|
+
exports.TransportVariantSchema = zod_1.z.discriminatedUnion('transport', [
|
|
146
|
+
TcpTransportSchema,
|
|
147
|
+
XHttpTransportSchema,
|
|
148
|
+
WsTransportSchema,
|
|
149
|
+
HttpUpgradeTransportSchema,
|
|
150
|
+
GrpcTransportSchema,
|
|
151
|
+
KcpTransportSchema,
|
|
152
|
+
HysteriaTransportSchema,
|
|
153
|
+
]);
|
|
154
|
+
const TlsSecuritySchema = zod_1.z.object({
|
|
155
|
+
security: zod_1.z.literal('tls'),
|
|
156
|
+
securityOptions: exports.TlsSecurityOptionsSchema,
|
|
157
|
+
});
|
|
158
|
+
const RealitySecuritySchema = zod_1.z.object({
|
|
159
|
+
security: zod_1.z.literal('reality'),
|
|
160
|
+
securityOptions: exports.RealitySecurityOptionsSchema,
|
|
161
|
+
});
|
|
162
|
+
const NoneSecuritySchema = zod_1.z.object({
|
|
163
|
+
security: zod_1.z.literal('none'),
|
|
164
|
+
});
|
|
165
|
+
exports.SecurityVariantSchema = zod_1.z.discriminatedUnion('security', [
|
|
166
|
+
TlsSecuritySchema,
|
|
167
|
+
RealitySecuritySchema,
|
|
168
|
+
NoneSecuritySchema,
|
|
169
|
+
]);
|
|
170
|
+
exports.ProxyEntryMetadataSchema = zod_1.z.object({
|
|
171
|
+
uuid: zod_1.z.string().uuid(),
|
|
172
|
+
tag: zod_1.z.string().nullable(),
|
|
173
|
+
excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)),
|
|
174
|
+
inboundTag: zod_1.z.string(),
|
|
175
|
+
configProfileUuid: zod_1.z.string().uuid().nullable(),
|
|
176
|
+
configProfileInboundUuid: zod_1.z.string().uuid().nullable(),
|
|
177
|
+
isDisabled: zod_1.z.boolean(),
|
|
178
|
+
isHidden: zod_1.z.boolean(),
|
|
179
|
+
viewPosition: zod_1.z.number().int(),
|
|
180
|
+
remark: zod_1.z.string(),
|
|
181
|
+
vlessRouteId: zod_1.z.number().int().nullable(),
|
|
182
|
+
rawInbound: zod_1.z.nullable(zod_1.z.unknown()),
|
|
183
|
+
});
|
|
184
|
+
exports.ResolvedProxyConfigSchema = zod_1.z.object({
|
|
185
|
+
finalRemark: zod_1.z.string(),
|
|
186
|
+
address: zod_1.z.string(),
|
|
187
|
+
port: zod_1.z.number().int().positive(),
|
|
188
|
+
protocol: zod_1.z.enum(['vless', 'trojan', 'shadowsocks', 'hysteria']),
|
|
189
|
+
protocolOptions: zod_1.z.union([
|
|
190
|
+
exports.VlessProtocolOptionsSchema,
|
|
191
|
+
exports.TrojanProtocolOptionsSchema,
|
|
192
|
+
exports.ShadowsocksProtocolOptionsSchema,
|
|
193
|
+
exports.HysteriaProtocolOptionsSchema,
|
|
194
|
+
]),
|
|
195
|
+
transport: zod_1.z.enum(['tcp', 'xhttp', 'ws', 'httpupgrade', 'grpc', 'kcp', 'hysteria']),
|
|
196
|
+
transportOptions: zod_1.z.union([
|
|
197
|
+
exports.TcpTransportOptionsSchema,
|
|
198
|
+
exports.XhttpTransportOptionsSchema,
|
|
199
|
+
exports.WsTransportOptionsSchema,
|
|
200
|
+
exports.HttpUpgradeTransportOptionsSchema,
|
|
201
|
+
exports.GrpcTransportOptionsSchema,
|
|
202
|
+
exports.KcpTransportOptionsSchema,
|
|
203
|
+
exports.HysteriaTransportOptionsSchema,
|
|
204
|
+
]),
|
|
205
|
+
security: zod_1.z.enum(['tls', 'reality', 'none']),
|
|
206
|
+
securityOptions: zod_1.z.union([exports.TlsSecurityOptionsSchema, exports.RealitySecurityOptionsSchema]).optional(),
|
|
207
|
+
streamOverrides: zod_1.z.object({
|
|
208
|
+
finalMask: zod_1.z.nullable(zod_1.z.unknown()),
|
|
209
|
+
sockopt: zod_1.z.nullable(zod_1.z.unknown()),
|
|
210
|
+
}),
|
|
211
|
+
mux: zod_1.z.nullable(zod_1.z.unknown()),
|
|
212
|
+
clientOverrides: zod_1.z.object({
|
|
213
|
+
shuffleHost: zod_1.z.boolean(),
|
|
214
|
+
mihomoX25519: zod_1.z.boolean(),
|
|
215
|
+
serverDescription: zod_1.z.string().nullable(),
|
|
216
|
+
xrayJsonTemplate: zod_1.z.nullable(zod_1.z.unknown()),
|
|
217
|
+
}),
|
|
218
|
+
metadata: exports.ProxyEntryMetadataSchema,
|
|
219
|
+
});
|