@remnawave/backend-contract 2.6.53 → 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/infra-billing/create-billing-node.command.d.ts +20 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +20 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +20 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +20 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -1
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +30 -20
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts.map +1 -1
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts +30 -20
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/disable.command.d.ts +18 -0
- package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/enable.command.d.ts +18 -0
- package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/reorder.command.d.ts +28 -0
- package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.d.ts +18 -0
- package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-all.command.d.ts +18 -0
- package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-one.command.d.ts +18 -0
- package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/update.command.d.ts +28 -0
- package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
- 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/constants/metrics/metric-names.constant.d.ts +10 -0
- package/build/backend/constants/metrics/metric-names.constant.d.ts.map +1 -1
- package/build/backend/constants/metrics/metric-names.constant.js +11 -0
- 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/infra-billing-available-node.schema.d.ts +10 -0
- package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -1
- package/build/backend/models/infra-billing-node.schema.d.ts +10 -0
- package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -1
- package/build/backend/models/node-system.schema.d.ts +16 -0
- package/build/backend/models/node-system.schema.d.ts.map +1 -1
- package/build/backend/models/node-system.schema.js +2 -0
- package/build/backend/models/nodes.schema.d.ts +14 -0
- package/build/backend/models/nodes.schema.d.ts.map +1 -1
- 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 +22 -12
- package/build/backend/models/torrent-blocker-report.schema.d.ts.map +1 -1
- package/build/backend/models/webhook/webhook.schema.d.ts +112 -32
- package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -1
- package/build/frontend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.js +2 -59
- package/build/frontend/constants/metrics/metric-names.constant.js +11 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/node-system.schema.js +2 -0
- package/build/frontend/models/resolved-proxy-config.schema.js +219 -0
- package/package.json +1 -1
package/build/frontend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetRawSubscriptionByShortUuidCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
5
6
|
const api_1 = require("../../../api");
|
|
6
7
|
const constants_1 = require("../../../constants");
|
|
7
|
-
const models_1 = require("../../../models");
|
|
8
8
|
var GetRawSubscriptionByShortUuidCommand;
|
|
9
9
|
(function (GetRawSubscriptionByShortUuidCommand) {
|
|
10
10
|
GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.SHORT_UUID_RAW;
|
|
@@ -31,64 +31,7 @@ var GetRawSubscriptionByShortUuidCommand;
|
|
|
31
31
|
isHwidLimited: zod_1.z.boolean(),
|
|
32
32
|
}),
|
|
33
33
|
headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string().optional()),
|
|
34
|
-
|
|
35
|
-
address: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
36
|
-
alpn: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
37
|
-
fingerprint: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
38
|
-
host: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
39
|
-
network: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
40
|
-
password: zod_1.z.object({
|
|
41
|
-
ssPassword: zod_1.z.string(),
|
|
42
|
-
trojanPassword: zod_1.z.string(),
|
|
43
|
-
vlessPassword: zod_1.z.string(),
|
|
44
|
-
}),
|
|
45
|
-
path: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
46
|
-
publicKey: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
47
|
-
port: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
|
|
48
|
-
protocol: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
49
|
-
remark: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
50
|
-
shortId: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
51
|
-
sni: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
52
|
-
spiderX: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
53
|
-
tls: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
54
|
-
rawSettings: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
|
|
55
|
-
headerType: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
56
|
-
request: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
|
|
57
|
-
}))),
|
|
58
|
-
additionalParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
|
|
59
|
-
mode: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
60
|
-
heartbeatPeriod: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
|
|
61
|
-
}))),
|
|
62
|
-
xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
|
|
63
|
-
muxParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
|
|
64
|
-
sockoptParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
|
|
65
|
-
serverDescription: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
66
|
-
flow: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
67
|
-
allowInsecure: zod_1.z.optional(zod_1.z.nullable(zod_1.z.boolean())),
|
|
68
|
-
shuffleHost: zod_1.z.optional(zod_1.z.nullable(zod_1.z.boolean())),
|
|
69
|
-
mihomoX25519: zod_1.z.optional(zod_1.z.nullable(zod_1.z.boolean())),
|
|
70
|
-
mldsa65Verify: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
71
|
-
encryption: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
72
|
-
protocolOptions: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
|
|
73
|
-
ss: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
|
|
74
|
-
method: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
|
|
75
|
-
}))),
|
|
76
|
-
}))),
|
|
77
|
-
dbData: zod_1.z.optional(zod_1.z.object({
|
|
78
|
-
rawInbound: zod_1.z.nullable(zod_1.z.object({})),
|
|
79
|
-
inboundTag: zod_1.z.string(),
|
|
80
|
-
uuid: zod_1.z.string(),
|
|
81
|
-
configProfileUuid: zod_1.z.nullable(zod_1.z.string()),
|
|
82
|
-
configProfileInboundUuid: zod_1.z.nullable(zod_1.z.string()),
|
|
83
|
-
isDisabled: zod_1.z.boolean(),
|
|
84
|
-
viewPosition: zod_1.z.number(),
|
|
85
|
-
remark: zod_1.z.string(),
|
|
86
|
-
isHidden: zod_1.z.boolean(),
|
|
87
|
-
tag: zod_1.z.nullable(zod_1.z.string()),
|
|
88
|
-
vlessRouteId: zod_1.z.number().int().nullable(),
|
|
89
|
-
})),
|
|
90
|
-
xrayJsonTemplate: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
|
|
91
|
-
})),
|
|
34
|
+
resolvedProxyConfigs: zod_1.z.array(models_1.ResolvedProxyConfigSchema),
|
|
92
35
|
}),
|
|
93
36
|
});
|
|
94
37
|
})(GetRawSubscriptionByShortUuidCommand || (exports.GetRawSubscriptionByShortUuidCommand = GetRawSubscriptionByShortUuidCommand = {}));
|
|
@@ -24,4 +24,15 @@ exports.METRIC_NAMES = {
|
|
|
24
24
|
PROCESS_ACTIVE_HANDLES: 'process_active_handles',
|
|
25
25
|
// General
|
|
26
26
|
PROCESS_UPTIME_SECONDS: 'process_uptime_seconds',
|
|
27
|
+
// Node system
|
|
28
|
+
NODE_NETWORK_RX_BYTES_PER_SEC: 'node_network_rx_bytes_per_sec',
|
|
29
|
+
NODE_NETWORK_TX_BYTES_PER_SEC: 'node_network_tx_bytes_per_sec',
|
|
30
|
+
NODE_NETWORK_RX_BYTES_TOTAL: 'node_network_rx_bytes_total',
|
|
31
|
+
NODE_NETWORK_TX_BYTES_TOTAL: 'node_network_tx_bytes_total',
|
|
32
|
+
NODE_MEMORY_TOTAL_BYTES: 'node_memory_total_bytes',
|
|
33
|
+
NODE_MEMORY_FREE_BYTES: 'node_memory_free_bytes',
|
|
34
|
+
NODE_UPTIME_SECONDS: 'node_uptime_seconds',
|
|
35
|
+
NODE_CPU_COUNT: 'node_cpu_count',
|
|
36
|
+
NODE_BASIC_INFO: 'node_basic_info',
|
|
37
|
+
NODE_SYSTEM_INFO: 'node_system_info',
|
|
27
38
|
};
|
|
@@ -35,6 +35,7 @@ __exportStar(require("./node-plugin.schema"), exports);
|
|
|
35
35
|
__exportStar(require("./node-system.schema"), exports);
|
|
36
36
|
__exportStar(require("./nodes.schema"), exports);
|
|
37
37
|
__exportStar(require("./remnawave-settings"), exports);
|
|
38
|
+
__exportStar(require("./resolved-proxy-config.schema"), exports);
|
|
38
39
|
__exportStar(require("./response-rules"), exports);
|
|
39
40
|
__exportStar(require("./snippets.schema"), exports);
|
|
40
41
|
__exportStar(require("./subscripion-page-config.schema"), exports);
|
|
@@ -23,7 +23,9 @@ exports.NodeSystemInfoSchema = zod_1.z.object({
|
|
|
23
23
|
});
|
|
24
24
|
exports.NodeSystemStatsSchema = zod_1.z.object({
|
|
25
25
|
memoryFree: zod_1.z.number(),
|
|
26
|
+
memoryUsed: zod_1.z.number(),
|
|
26
27
|
uptime: zod_1.z.number(),
|
|
28
|
+
loadAvg: zod_1.z.array(zod_1.z.number()),
|
|
27
29
|
interface: zod_1.z.nullable(exports.NetworkInterfaceSchema),
|
|
28
30
|
});
|
|
29
31
|
exports.NodeSystemSchema = zod_1.z.object({
|
|
@@ -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
|
+
});
|