https://dev.kronoz.win/r/marzneshin.git
1import { z } from "zod";
2
3export const alpnOptions = [
4 "none",
5 "h2",
6 "h3",
7 "h3,h2",
8 "http/1.1",
9 "h2,http/1.1",
10 "h3,h2,http/1.1"
11]
12
13export const TlsSchema = z.object({
14 sni: z.string().nullable().optional(),
15 alpn: z
16 .enum(["", ...alpnOptions])
17 .optional()
18 .default("none"),
19 allowinsecure: z.boolean().default(false).optional(),
20});
21
22export type TlsSchemaType = z.infer<typeof TlsSchema>;