gitscope
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/dialogs/mutation/profiles/profiles.ts · nightly
Source
1 4056c66 Dawsh 1y ago import {
2 4056c66 Dawsh 1y ago GeneralSchema,
3 4056c66 Dawsh 1y ago GeneralProfileFields,
4 4056c66 Dawsh 1y ago generalProfileDefaultValue,
5 4056c66 Dawsh 1y ago } from "./general";
6 4056c66 Dawsh 1y ago import {
7 4056c66 Dawsh 1y ago WireguardSchema,
8 4056c66 Dawsh 1y ago WireguardProfileFields,
9 4056c66 Dawsh 1y ago wireguardProfileDefaultValue,
10 4056c66 Dawsh 1y ago } from "./wireguard";
11 4056c66 Dawsh 1y ago import {
12 4056c66 Dawsh 1y ago Hysteria2Schema,
13 4056c66 Dawsh 1y ago Hysteria2ProfileFields,
14 4056c66 Dawsh 1y ago hysteria2ProfileDefaultValue,
15 4056c66 Dawsh 1y ago } from "./hysteria2";
16 4056c66 Dawsh 1y ago import {
17 4056c66 Dawsh 1y ago ShadowTlsSchema,
18 4056c66 Dawsh 1y ago ShadowTlsProfileFields,
19 4056c66 Dawsh 1y ago shadowTlsProfileDefaultValue,
20 4056c66 Dawsh 1y ago } from "./shadowtls";
21 4056c66 Dawsh 1y ago import { TuicSchema, TuicProfileFields, tuicProfileDefaultValue } from "./tuic";
22 4056c66 Dawsh 1y ago import { FC } from "react";
23 4056c66 Dawsh 1y ago import { z } from "zod";
24 4056c66 Dawsh 1y ago import { ProtocolType } from "@marzneshin/modules/inbounds";
25 4056c66 Dawsh 1y ago
26 4056c66 Dawsh 1y ago export type ProfileConfig = [z.ZodTypeAny, FC, object];
27 4056c66 Dawsh 1y ago
28 4056c66 Dawsh 1y ago export const generalProfile: ProfileConfig = [
29 4056c66 Dawsh 1y ago GeneralSchema,
30 4056c66 Dawsh 1y ago GeneralProfileFields,
31 4056c66 Dawsh 1y ago generalProfileDefaultValue,
32 4056c66 Dawsh 1y ago ];
33 4056c66 Dawsh 1y ago
34 4056c66 Dawsh 1y ago export const profileByProtocol: Record<ProtocolType, ProfileConfig> = {
35 4056c66 Dawsh 1y ago vless: generalProfile,
36 4056c66 Dawsh 1y ago vmess: generalProfile,
37 4056c66 Dawsh 1y ago trojan: generalProfile,
38 4056c66 Dawsh 1y ago shadowsocks: generalProfile,
39 4056c66 Dawsh 1y ago shadowsocks2022: generalProfile,
40 4056c66 Dawsh 1y ago wireguard: [
41 4056c66 Dawsh 1y ago WireguardSchema,
42 4056c66 Dawsh 1y ago WireguardProfileFields,
43 4056c66 Dawsh 1y ago wireguardProfileDefaultValue,
44 4056c66 Dawsh 1y ago ],
45 4056c66 Dawsh 1y ago hysteria2: [
46 4056c66 Dawsh 1y ago Hysteria2Schema,
47 4056c66 Dawsh 1y ago Hysteria2ProfileFields,
48 4056c66 Dawsh 1y ago hysteria2ProfileDefaultValue,
49 4056c66 Dawsh 1y ago ],
50 4056c66 Dawsh 1y ago shadowtls: [
51 4056c66 Dawsh 1y ago ShadowTlsSchema,
52 4056c66 Dawsh 1y ago ShadowTlsProfileFields,
53 4056c66 Dawsh 1y ago shadowTlsProfileDefaultValue,
54 4056c66 Dawsh 1y ago ],
55 4056c66 Dawsh 1y ago tuic: [TuicSchema, TuicProfileFields, tuicProfileDefaultValue],
56 4056c66 Dawsh 1y ago };