@remnawave/backend-contract 0.3.26 → 0.3.28

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.
Files changed (29) hide show
  1. package/build/backend/api/routes.js +1 -1
  2. package/build/backend/commands/hosts/create.command.d.ts +16 -0
  3. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  4. package/build/backend/commands/hosts/create.command.js +4 -4
  5. package/build/backend/commands/hosts/get-all.command.d.ts +9 -0
  6. package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
  7. package/build/backend/commands/hosts/get-one.command.d.ts +9 -0
  8. package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
  9. package/build/backend/commands/hosts/reorder.command.d.ts +5 -0
  10. package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
  11. package/build/backend/commands/hosts/update.command.d.ts +21 -0
  12. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  13. package/build/backend/commands/hosts/update.command.js +4 -4
  14. package/build/backend/constants/hosts/index.d.ts +1 -0
  15. package/build/backend/constants/hosts/index.d.ts.map +1 -1
  16. package/build/backend/constants/hosts/index.js +1 -0
  17. package/build/backend/constants/hosts/security-layers.d.ts +8 -0
  18. package/build/backend/constants/hosts/security-layers.d.ts.map +1 -0
  19. package/build/backend/constants/hosts/security-layers.js +9 -0
  20. package/build/backend/models/hosts.schema.d.ts +7 -0
  21. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  22. package/build/backend/models/hosts.schema.js +2 -0
  23. package/build/frontend/api/routes.js +1 -1
  24. package/build/frontend/commands/hosts/create.command.js +4 -4
  25. package/build/frontend/commands/hosts/update.command.js +4 -4
  26. package/build/frontend/constants/hosts/index.js +1 -0
  27. package/build/frontend/constants/hosts/security-layers.js +9 -0
  28. package/build/frontend/models/hosts.schema.js +2 -0
  29. package/package.json +1 -1
@@ -95,7 +95,7 @@ exports.REST_API = {
95
95
  },
96
96
  SUBSCRIPTION: {
97
97
  GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}/${shortUuid}`,
98
- GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}/`,
98
+ GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
99
99
  GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${shortUuid}${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO}`,
100
100
  },
101
101
  HOSTS: {
@@ -28,6 +28,11 @@ export declare namespace CreateHostCommand {
28
28
  }>>>;
29
29
  allowInsecure: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
30
30
  isDisabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
31
+ securityLayer: z.ZodOptional<z.ZodNativeEnum<{
32
+ readonly DEFAULT: "DEFAULT";
33
+ readonly TLS: "TLS";
34
+ readonly NONE: "NONE";
35
+ }>>;
31
36
  }, "strip", z.ZodTypeAny, {
32
37
  inboundUuid: string;
33
38
  remark: string;
@@ -40,6 +45,7 @@ export declare namespace CreateHostCommand {
40
45
  fingerprint?: "chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized" | null | undefined;
41
46
  allowInsecure?: boolean | undefined;
42
47
  isDisabled?: boolean | undefined;
48
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
43
49
  }, {
44
50
  inboundUuid: string;
45
51
  remark: string;
@@ -52,6 +58,7 @@ export declare namespace CreateHostCommand {
52
58
  fingerprint?: "chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized" | null | undefined;
53
59
  allowInsecure?: boolean | undefined;
54
60
  isDisabled?: boolean | undefined;
61
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
55
62
  }>;
56
63
  type Request = z.infer<typeof RequestSchema>;
57
64
  const ResponseSchema: z.ZodObject<{
@@ -69,6 +76,11 @@ export declare namespace CreateHostCommand {
69
76
  fingerprint: z.ZodNullable<z.ZodString>;
70
77
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
71
78
  isDisabled: z.ZodDefault<z.ZodBoolean>;
79
+ securityLayer: z.ZodNativeEnum<{
80
+ readonly DEFAULT: "DEFAULT";
81
+ readonly TLS: "TLS";
82
+ readonly NONE: "NONE";
83
+ }>;
72
84
  }, "strip", z.ZodTypeAny, {
73
85
  uuid: string;
74
86
  path: string | null;
@@ -83,6 +95,7 @@ export declare namespace CreateHostCommand {
83
95
  fingerprint: string | null;
84
96
  allowInsecure: boolean;
85
97
  isDisabled: boolean;
98
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
86
99
  }, {
87
100
  uuid: string;
88
101
  path: string | null;
@@ -95,6 +108,7 @@ export declare namespace CreateHostCommand {
95
108
  host: string | null;
96
109
  alpn: string | null;
97
110
  fingerprint: string | null;
111
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
98
112
  allowInsecure?: boolean | undefined;
99
113
  isDisabled?: boolean | undefined;
100
114
  }>;
@@ -113,6 +127,7 @@ export declare namespace CreateHostCommand {
113
127
  fingerprint: string | null;
114
128
  allowInsecure: boolean;
115
129
  isDisabled: boolean;
130
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
116
131
  };
117
132
  }, {
118
133
  response: {
@@ -127,6 +142,7 @@ export declare namespace CreateHostCommand {
127
142
  host: string | null;
128
143
  alpn: string | null;
129
144
  fingerprint: string | null;
145
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
130
146
  allowInsecure?: boolean | undefined;
131
147
  isDisabled?: boolean | undefined;
132
148
  };
@@ -1 +1 @@
1
- {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6BxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateHostCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const fingerprints_1 = require("../../constants/hosts/fingerprints");
6
- const alpn_1 = require("../../constants/hosts/alpn");
5
+ const hosts_1 = require("../../constants/hosts");
7
6
  const models_1 = require("../../models");
8
7
  const api_1 = require("../../api");
9
8
  var CreateHostCommand;
@@ -34,10 +33,11 @@ var CreateHostCommand;
34
33
  path: zod_1.z.string().optional(),
35
34
  sni: zod_1.z.string().optional(),
36
35
  host: zod_1.z.string().optional(),
37
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
38
- fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
36
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.ALPN).nullable()),
37
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.FINGERPRINTS).nullable()),
39
38
  allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
39
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
+ securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS)),
41
41
  });
42
42
  CreateHostCommand.ResponseSchema = zod_1.z.object({
43
43
  response: models_1.HostsSchema,
@@ -17,6 +17,11 @@ export declare namespace GetAllHostsCommand {
17
17
  fingerprint: z.ZodNullable<z.ZodString>;
18
18
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
19
19
  isDisabled: z.ZodDefault<z.ZodBoolean>;
20
+ securityLayer: z.ZodNativeEnum<{
21
+ readonly DEFAULT: "DEFAULT";
22
+ readonly TLS: "TLS";
23
+ readonly NONE: "NONE";
24
+ }>;
20
25
  }, "strip", z.ZodTypeAny, {
21
26
  uuid: string;
22
27
  path: string | null;
@@ -31,6 +36,7 @@ export declare namespace GetAllHostsCommand {
31
36
  fingerprint: string | null;
32
37
  allowInsecure: boolean;
33
38
  isDisabled: boolean;
39
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
34
40
  }, {
35
41
  uuid: string;
36
42
  path: string | null;
@@ -43,6 +49,7 @@ export declare namespace GetAllHostsCommand {
43
49
  host: string | null;
44
50
  alpn: string | null;
45
51
  fingerprint: string | null;
52
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
46
53
  allowInsecure?: boolean | undefined;
47
54
  isDisabled?: boolean | undefined;
48
55
  }>, "many">;
@@ -61,6 +68,7 @@ export declare namespace GetAllHostsCommand {
61
68
  fingerprint: string | null;
62
69
  allowInsecure: boolean;
63
70
  isDisabled: boolean;
71
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
64
72
  }[];
65
73
  }, {
66
74
  response: {
@@ -75,6 +83,7 @@ export declare namespace GetAllHostsCommand {
75
83
  host: string | null;
76
84
  alpn: string | null;
77
85
  fingerprint: string | null;
86
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
78
87
  allowInsecure?: boolean | undefined;
79
88
  isDisabled?: boolean | undefined;
80
89
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"get-all.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-all.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,kBAAyB,CAAC;IACnC,MAAM,OAAO,kBAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-all.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-all.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,kBAAyB,CAAC;IACnC,MAAM,OAAO,kBAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -25,6 +25,11 @@ export declare namespace GetOneHostCommand {
25
25
  fingerprint: z.ZodNullable<z.ZodString>;
26
26
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
27
27
  isDisabled: z.ZodDefault<z.ZodBoolean>;
28
+ securityLayer: z.ZodNativeEnum<{
29
+ readonly DEFAULT: "DEFAULT";
30
+ readonly TLS: "TLS";
31
+ readonly NONE: "NONE";
32
+ }>;
28
33
  }, "strip", z.ZodTypeAny, {
29
34
  uuid: string;
30
35
  path: string | null;
@@ -39,6 +44,7 @@ export declare namespace GetOneHostCommand {
39
44
  fingerprint: string | null;
40
45
  allowInsecure: boolean;
41
46
  isDisabled: boolean;
47
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
42
48
  }, {
43
49
  uuid: string;
44
50
  path: string | null;
@@ -51,6 +57,7 @@ export declare namespace GetOneHostCommand {
51
57
  host: string | null;
52
58
  alpn: string | null;
53
59
  fingerprint: string | null;
60
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
54
61
  allowInsecure?: boolean | undefined;
55
62
  isDisabled?: boolean | undefined;
56
63
  }>;
@@ -69,6 +76,7 @@ export declare namespace GetOneHostCommand {
69
76
  fingerprint: string | null;
70
77
  allowInsecure: boolean;
71
78
  isDisabled: boolean;
79
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
72
80
  };
73
81
  }, {
74
82
  response: {
@@ -83,6 +91,7 @@ export declare namespace GetOneHostCommand {
83
91
  host: string | null;
84
92
  alpn: string | null;
85
93
  fingerprint: string | null;
94
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
86
95
  allowInsecure?: boolean | undefined;
87
96
  isDisabled?: boolean | undefined;
88
97
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-one.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-one.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-one.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-one.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -17,6 +17,11 @@ export declare namespace ReorderHostCommand {
17
17
  fingerprint: z.ZodNullable<z.ZodString>;
18
18
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
19
19
  isDisabled: z.ZodDefault<z.ZodBoolean>;
20
+ securityLayer: z.ZodNativeEnum<{
21
+ readonly DEFAULT: "DEFAULT";
22
+ readonly TLS: "TLS";
23
+ readonly NONE: "NONE";
24
+ }>;
20
25
  }, "uuid" | "viewPosition">, "strip", z.ZodTypeAny, {
21
26
  uuid: string;
22
27
  viewPosition: number;
@@ -1 +1 @@
1
- {"version":3,"file":"reorder.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/reorder.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"reorder.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/reorder.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -16,6 +16,11 @@ export declare namespace UpdateHostCommand {
16
16
  fingerprint: z.ZodNullable<z.ZodString>;
17
17
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
18
18
  isDisabled: z.ZodDefault<z.ZodBoolean>;
19
+ securityLayer: z.ZodNativeEnum<{
20
+ readonly DEFAULT: "DEFAULT";
21
+ readonly TLS: "TLS";
22
+ readonly NONE: "NONE";
23
+ }>;
19
24
  }, "uuid">, {
20
25
  inboundUuid: z.ZodOptional<z.ZodString>;
21
26
  remark: z.ZodOptional<z.ZodString>;
@@ -42,6 +47,11 @@ export declare namespace UpdateHostCommand {
42
47
  }>>>;
43
48
  allowInsecure: z.ZodOptional<z.ZodBoolean>;
44
49
  isDisabled: z.ZodOptional<z.ZodBoolean>;
50
+ securityLayer: z.ZodOptional<z.ZodNativeEnum<{
51
+ readonly DEFAULT: "DEFAULT";
52
+ readonly TLS: "TLS";
53
+ readonly NONE: "NONE";
54
+ }>>;
45
55
  }>, "strip", z.ZodTypeAny, {
46
56
  uuid: string;
47
57
  path?: string | undefined;
@@ -55,6 +65,7 @@ export declare namespace UpdateHostCommand {
55
65
  fingerprint?: "chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized" | null | undefined;
56
66
  allowInsecure?: boolean | undefined;
57
67
  isDisabled?: boolean | undefined;
68
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
58
69
  }, {
59
70
  uuid: string;
60
71
  path?: string | undefined;
@@ -68,6 +79,7 @@ export declare namespace UpdateHostCommand {
68
79
  fingerprint?: "chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized" | null | undefined;
69
80
  allowInsecure?: boolean | undefined;
70
81
  isDisabled?: boolean | undefined;
82
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
71
83
  }>;
72
84
  type Request = z.infer<typeof RequestSchema>;
73
85
  const ResponseSchema: z.ZodObject<{
@@ -85,6 +97,11 @@ export declare namespace UpdateHostCommand {
85
97
  fingerprint: z.ZodNullable<z.ZodString>;
86
98
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
87
99
  isDisabled: z.ZodDefault<z.ZodBoolean>;
100
+ securityLayer: z.ZodNativeEnum<{
101
+ readonly DEFAULT: "DEFAULT";
102
+ readonly TLS: "TLS";
103
+ readonly NONE: "NONE";
104
+ }>;
88
105
  }, "strip", z.ZodTypeAny, {
89
106
  uuid: string;
90
107
  path: string | null;
@@ -99,6 +116,7 @@ export declare namespace UpdateHostCommand {
99
116
  fingerprint: string | null;
100
117
  allowInsecure: boolean;
101
118
  isDisabled: boolean;
119
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
102
120
  }, {
103
121
  uuid: string;
104
122
  path: string | null;
@@ -111,6 +129,7 @@ export declare namespace UpdateHostCommand {
111
129
  host: string | null;
112
130
  alpn: string | null;
113
131
  fingerprint: string | null;
132
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
114
133
  allowInsecure?: boolean | undefined;
115
134
  isDisabled?: boolean | undefined;
116
135
  }>;
@@ -129,6 +148,7 @@ export declare namespace UpdateHostCommand {
129
148
  fingerprint: string | null;
130
149
  allowInsecure: boolean;
131
150
  isDisabled: boolean;
151
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
132
152
  };
133
153
  }, {
134
154
  response: {
@@ -143,6 +163,7 @@ export declare namespace UpdateHostCommand {
143
163
  host: string | null;
144
164
  alpn: string | null;
145
165
  fingerprint: string | null;
166
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
146
167
  allowInsecure?: boolean | undefined;
147
168
  isDisabled?: boolean | undefined;
148
169
  };
@@ -1 +1 @@
1
- {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmCxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoCxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateHostCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const fingerprints_1 = require("../../constants/hosts/fingerprints");
6
- const alpn_1 = require("../../constants/hosts/alpn");
5
+ const hosts_1 = require("../../constants/hosts");
7
6
  const models_1 = require("../../models");
8
7
  const api_1 = require("../../api");
9
8
  var UpdateHostCommand;
@@ -41,10 +40,11 @@ var UpdateHostCommand;
41
40
  path: zod_1.z.optional(zod_1.z.string()),
42
41
  sni: zod_1.z.optional(zod_1.z.string()),
43
42
  host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
43
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.ALPN).nullable()),
44
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.FINGERPRINTS).nullable()),
46
45
  allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
47
46
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
47
+ securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS)),
48
48
  });
49
49
  UpdateHostCommand.ResponseSchema = zod_1.z.object({
50
50
  response: models_1.HostsSchema,
@@ -1,3 +1,4 @@
1
1
  export * from './alpn';
2
2
  export * from './fingerprints';
3
+ export * from './security-layers';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/hosts/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/hosts/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./alpn"), exports);
18
18
  __exportStar(require("./fingerprints"), exports);
19
+ __exportStar(require("./security-layers"), exports);
@@ -0,0 +1,8 @@
1
+ export declare const SECURITY_LAYERS: {
2
+ readonly DEFAULT: "DEFAULT";
3
+ readonly TLS: "TLS";
4
+ readonly NONE: "NONE";
5
+ };
6
+ export type TSecurityLayers = [keyof typeof SECURITY_LAYERS][number];
7
+ export declare const SECURITY_LAYERS_VALUES: ("DEFAULT" | "TLS" | "NONE")[];
8
+ //# sourceMappingURL=security-layers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-layers.d.ts","sourceRoot":"","sources":["../../../../constants/hosts/security-layers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AACrE,eAAO,MAAM,sBAAsB,gCAAiC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SECURITY_LAYERS_VALUES = exports.SECURITY_LAYERS = void 0;
4
+ exports.SECURITY_LAYERS = {
5
+ DEFAULT: 'DEFAULT',
6
+ TLS: 'TLS',
7
+ NONE: 'NONE',
8
+ };
9
+ exports.SECURITY_LAYERS_VALUES = Object.values(exports.SECURITY_LAYERS);
@@ -13,6 +13,11 @@ export declare const HostsSchema: z.ZodObject<{
13
13
  fingerprint: z.ZodNullable<z.ZodString>;
14
14
  allowInsecure: z.ZodDefault<z.ZodBoolean>;
15
15
  isDisabled: z.ZodDefault<z.ZodBoolean>;
16
+ securityLayer: z.ZodNativeEnum<{
17
+ readonly DEFAULT: "DEFAULT";
18
+ readonly TLS: "TLS";
19
+ readonly NONE: "NONE";
20
+ }>;
16
21
  }, "strip", z.ZodTypeAny, {
17
22
  uuid: string;
18
23
  path: string | null;
@@ -27,6 +32,7 @@ export declare const HostsSchema: z.ZodObject<{
27
32
  fingerprint: string | null;
28
33
  allowInsecure: boolean;
29
34
  isDisabled: boolean;
35
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
30
36
  }, {
31
37
  uuid: string;
32
38
  path: string | null;
@@ -39,6 +45,7 @@ export declare const HostsSchema: z.ZodObject<{
39
45
  host: string | null;
40
46
  alpn: string | null;
41
47
  fingerprint: string | null;
48
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
42
49
  allowInsecure?: boolean | undefined;
43
50
  isDisabled?: boolean | undefined;
44
51
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EActB,CAAC"}
1
+ {"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAetB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HostsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const hosts_1 = require("../constants/hosts");
5
6
  exports.HostsSchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string().uuid(),
7
8
  inboundUuid: zod_1.z.string().uuid(),
@@ -16,4 +17,5 @@ exports.HostsSchema = zod_1.z.object({
16
17
  fingerprint: zod_1.z.string().nullable(),
17
18
  allowInsecure: zod_1.z.boolean().default(false),
18
19
  isDisabled: zod_1.z.boolean().default(false),
20
+ securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS),
19
21
  });
@@ -95,7 +95,7 @@ exports.REST_API = {
95
95
  },
96
96
  SUBSCRIPTION: {
97
97
  GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}/${shortUuid}`,
98
- GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}/`,
98
+ GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
99
99
  GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${shortUuid}${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO}`,
100
100
  },
101
101
  HOSTS: {
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateHostCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const fingerprints_1 = require("../../constants/hosts/fingerprints");
6
- const alpn_1 = require("../../constants/hosts/alpn");
5
+ const hosts_1 = require("../../constants/hosts");
7
6
  const models_1 = require("../../models");
8
7
  const api_1 = require("../../api");
9
8
  var CreateHostCommand;
@@ -34,10 +33,11 @@ var CreateHostCommand;
34
33
  path: zod_1.z.string().optional(),
35
34
  sni: zod_1.z.string().optional(),
36
35
  host: zod_1.z.string().optional(),
37
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
38
- fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
36
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.ALPN).nullable()),
37
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.FINGERPRINTS).nullable()),
39
38
  allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
39
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
+ securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS)),
41
41
  });
42
42
  CreateHostCommand.ResponseSchema = zod_1.z.object({
43
43
  response: models_1.HostsSchema,
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateHostCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const fingerprints_1 = require("../../constants/hosts/fingerprints");
6
- const alpn_1 = require("../../constants/hosts/alpn");
5
+ const hosts_1 = require("../../constants/hosts");
7
6
  const models_1 = require("../../models");
8
7
  const api_1 = require("../../api");
9
8
  var UpdateHostCommand;
@@ -41,10 +40,11 @@ var UpdateHostCommand;
41
40
  path: zod_1.z.optional(zod_1.z.string()),
42
41
  sni: zod_1.z.optional(zod_1.z.string()),
43
42
  host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
43
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.ALPN).nullable()),
44
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.FINGERPRINTS).nullable()),
46
45
  allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
47
46
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
47
+ securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS)),
48
48
  });
49
49
  UpdateHostCommand.ResponseSchema = zod_1.z.object({
50
50
  response: models_1.HostsSchema,
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./alpn"), exports);
18
18
  __exportStar(require("./fingerprints"), exports);
19
+ __exportStar(require("./security-layers"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SECURITY_LAYERS_VALUES = exports.SECURITY_LAYERS = void 0;
4
+ exports.SECURITY_LAYERS = {
5
+ DEFAULT: 'DEFAULT',
6
+ TLS: 'TLS',
7
+ NONE: 'NONE',
8
+ };
9
+ exports.SECURITY_LAYERS_VALUES = Object.values(exports.SECURITY_LAYERS);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HostsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const hosts_1 = require("../constants/hosts");
5
6
  exports.HostsSchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string().uuid(),
7
8
  inboundUuid: zod_1.z.string().uuid(),
@@ -16,4 +17,5 @@ exports.HostsSchema = zod_1.z.object({
16
17
  fingerprint: zod_1.z.string().nullable(),
17
18
  allowInsecure: zod_1.z.boolean().default(false),
18
19
  isDisabled: zod_1.z.boolean().default(false),
20
+ securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS),
19
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.26",
3
+ "version": "0.3.28",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",