@remnawave/backend-contract 3.4.1 → 3.4.2
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/hosts/bulk/update-many-hosts.command.d.ts +12 -0
- package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/create.command.d.ts +24 -0
- package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/get-host.command.d.ts +12 -0
- package/build/backend/commands/hosts/get-host.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/get-hosts.command.d.ts +12 -0
- package/build/backend/commands/hosts/get-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/host.response.d.ts +12 -0
- package/build/backend/commands/hosts/host.response.d.ts.map +1 -1
- package/build/backend/commands/hosts/update.command.d.ts +24 -0
- package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +12 -0
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/models/host-mapper/host-mapper.schema.d.ts +24 -0
- package/build/backend/models/host-mapper/host-mapper.schema.d.ts.map +1 -1
- package/build/backend/models/host-mapper/host-mapper.schema.js +45 -3
- package/build/backend/models/hosts.schema.d.ts +12 -0
- package/build/backend/models/hosts.schema.d.ts.map +1 -1
- package/build/backend/models/resolved-proxy-config.schema.d.ts +24 -0
- package/build/backend/models/resolved-proxy-config.schema.d.ts.map +1 -1
- package/build/frontend/models/host-mapper/host-mapper.schema.js +45 -3
- package/package.json +1 -1
|
@@ -55,6 +55,18 @@ export declare namespace UpdateManyHostsCommand {
|
|
|
55
55
|
op: z.ZodLiteral<"unset">;
|
|
56
56
|
to: z.ZodString;
|
|
57
57
|
}, z.core.$strip>], "op">>>;
|
|
58
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
+
op: z.ZodLiteral<"copy">;
|
|
60
|
+
from: z.ZodString;
|
|
61
|
+
to: z.ZodString;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
op: z.ZodLiteral<"set">;
|
|
64
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
65
|
+
to: z.ZodString;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
op: z.ZodLiteral<"unset">;
|
|
68
|
+
to: z.ZodString;
|
|
69
|
+
}, z.core.$strip>], "op">>>;
|
|
58
70
|
}, z.core.$strip>>>;
|
|
59
71
|
remark: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
60
72
|
address: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/update-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,0BAAM,CAAC;IAEpB,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"update-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/update-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,0BAAM,CAAC;IAEpB,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAIxB,CAAC;IAEP,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC/D"}
|
|
@@ -98,6 +98,18 @@ export declare namespace CreateHostCommand {
|
|
|
98
98
|
op: z.ZodLiteral<"unset">;
|
|
99
99
|
to: z.ZodString;
|
|
100
100
|
}, z.core.$strip>], "op">>>;
|
|
101
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
102
|
+
op: z.ZodLiteral<"copy">;
|
|
103
|
+
from: z.ZodString;
|
|
104
|
+
to: z.ZodString;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
op: z.ZodLiteral<"set">;
|
|
107
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
108
|
+
to: z.ZodString;
|
|
109
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
+
op: z.ZodLiteral<"unset">;
|
|
111
|
+
to: z.ZodString;
|
|
112
|
+
}, z.core.$strip>], "op">>>;
|
|
101
113
|
}, z.core.$strip>>;
|
|
102
114
|
}, z.core.$strip>;
|
|
103
115
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -198,6 +210,18 @@ export declare namespace CreateHostCommand {
|
|
|
198
210
|
op: z.ZodLiteral<"unset">;
|
|
199
211
|
to: z.ZodString;
|
|
200
212
|
}, z.core.$strip>], "op">>>;
|
|
213
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
214
|
+
op: z.ZodLiteral<"copy">;
|
|
215
|
+
from: z.ZodString;
|
|
216
|
+
to: z.ZodString;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
op: z.ZodLiteral<"set">;
|
|
219
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
220
|
+
to: z.ZodString;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
op: z.ZodLiteral<"unset">;
|
|
223
|
+
to: z.ZodString;
|
|
224
|
+
}, z.core.$strip>], "op">>>;
|
|
201
225
|
}, z.core.$strip>;
|
|
202
226
|
}, z.core.$strip>;
|
|
203
227
|
}, z.core.$strip>;
|
|
@@ -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;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB
|
|
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;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqD5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -104,6 +104,18 @@ export declare namespace GetHostCommand {
|
|
|
104
104
|
op: z.ZodLiteral<"unset">;
|
|
105
105
|
to: z.ZodString;
|
|
106
106
|
}, z.core.$strip>], "op">>>;
|
|
107
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
108
|
+
op: z.ZodLiteral<"copy">;
|
|
109
|
+
from: z.ZodString;
|
|
110
|
+
to: z.ZodString;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
op: z.ZodLiteral<"set">;
|
|
113
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
114
|
+
to: z.ZodString;
|
|
115
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
116
|
+
op: z.ZodLiteral<"unset">;
|
|
117
|
+
to: z.ZodString;
|
|
118
|
+
}, z.core.$strip>], "op">>>;
|
|
107
119
|
}, z.core.$strip>;
|
|
108
120
|
}, z.core.$strip>;
|
|
109
121
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-host.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-host.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,cAAc,CAAC;IACrB,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-host.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-host.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,cAAc,CAAC;IACrB,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -101,6 +101,18 @@ export declare namespace GetHostsCommand {
|
|
|
101
101
|
op: z.ZodLiteral<"unset">;
|
|
102
102
|
to: z.ZodString;
|
|
103
103
|
}, z.core.$strip>], "op">>>;
|
|
104
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
105
|
+
op: z.ZodLiteral<"copy">;
|
|
106
|
+
from: z.ZodString;
|
|
107
|
+
to: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
op: z.ZodLiteral<"set">;
|
|
110
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
111
|
+
to: z.ZodString;
|
|
112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
+
op: z.ZodLiteral<"unset">;
|
|
114
|
+
to: z.ZodString;
|
|
115
|
+
}, z.core.$strip>], "op">>>;
|
|
104
116
|
}, z.core.$strip>;
|
|
105
117
|
}, z.core.$strip>>;
|
|
106
118
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-hosts.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,eAAqB,CAAC;IAC/B,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAG1B,CAAC;IAEI,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-hosts.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,eAAqB,CAAC;IAC/B,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAG1B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -97,6 +97,18 @@ export declare const HostResponseSchema: z.ZodObject<{
|
|
|
97
97
|
op: z.ZodLiteral<"unset">;
|
|
98
98
|
to: z.ZodString;
|
|
99
99
|
}, z.core.$strip>], "op">>>;
|
|
100
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
+
op: z.ZodLiteral<"copy">;
|
|
102
|
+
from: z.ZodString;
|
|
103
|
+
to: z.ZodString;
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
op: z.ZodLiteral<"set">;
|
|
106
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
107
|
+
to: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
op: z.ZodLiteral<"unset">;
|
|
110
|
+
to: z.ZodString;
|
|
111
|
+
}, z.core.$strip>], "op">>>;
|
|
100
112
|
}, z.core.$strip>;
|
|
101
113
|
}, z.core.$strip>;
|
|
102
114
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.response.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/host.response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"host.response.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/host.response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7B,CAAC"}
|
|
@@ -99,6 +99,18 @@ export declare namespace UpdateHostCommand {
|
|
|
99
99
|
op: z.ZodLiteral<"unset">;
|
|
100
100
|
to: z.ZodString;
|
|
101
101
|
}, z.core.$strip>], "op">>>;
|
|
102
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
103
|
+
op: z.ZodLiteral<"copy">;
|
|
104
|
+
from: z.ZodString;
|
|
105
|
+
to: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
op: z.ZodLiteral<"set">;
|
|
108
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
109
|
+
to: z.ZodString;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
op: z.ZodLiteral<"unset">;
|
|
112
|
+
to: z.ZodString;
|
|
113
|
+
}, z.core.$strip>], "op">>>;
|
|
102
114
|
}, z.core.$strip>>;
|
|
103
115
|
}, z.core.$strip>;
|
|
104
116
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -199,6 +211,18 @@ export declare namespace UpdateHostCommand {
|
|
|
199
211
|
op: z.ZodLiteral<"unset">;
|
|
200
212
|
to: z.ZodString;
|
|
201
213
|
}, z.core.$strip>], "op">>>;
|
|
214
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
215
|
+
op: z.ZodLiteral<"copy">;
|
|
216
|
+
from: z.ZodString;
|
|
217
|
+
to: z.ZodString;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
op: z.ZodLiteral<"set">;
|
|
220
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
221
|
+
to: z.ZodString;
|
|
222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
+
op: z.ZodLiteral<"unset">;
|
|
224
|
+
to: z.ZodString;
|
|
225
|
+
}, z.core.$strip>], "op">>>;
|
|
202
226
|
}, z.core.$strip>;
|
|
203
227
|
}, z.core.$strip>;
|
|
204
228
|
}, z.core.$strip>;
|
|
@@ -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;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB
|
|
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;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuD5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts
CHANGED
|
@@ -128,6 +128,18 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
|
|
|
128
128
|
op: z.ZodLiteral<"unset">;
|
|
129
129
|
to: z.ZodString;
|
|
130
130
|
}, z.core.$strip>], "op">>>;
|
|
131
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
|
+
op: z.ZodLiteral<"copy">;
|
|
133
|
+
from: z.ZodString;
|
|
134
|
+
to: z.ZodString;
|
|
135
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
+
op: z.ZodLiteral<"set">;
|
|
137
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
138
|
+
to: z.ZodString;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
op: z.ZodLiteral<"unset">;
|
|
141
|
+
to: z.ZodString;
|
|
142
|
+
}, z.core.$strip>], "op">>>;
|
|
131
143
|
}, z.core.$strip>;
|
|
132
144
|
}, z.core.$strip>;
|
|
133
145
|
metadata: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAA+C,CAAC;IACzD,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,kBAAkB;;qBAM7B,CAAC;IAEI,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAA+C,CAAC;IACzD,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,kBAAkB;;qBAM7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoBzB,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -23,6 +23,18 @@ export declare const MihomoHostMapperOperationsSchema: z.ZodDiscriminatedUnion<[
|
|
|
23
23
|
op: z.ZodLiteral<"unset">;
|
|
24
24
|
to: z.ZodString;
|
|
25
25
|
}, z.core.$strip>], "op">;
|
|
26
|
+
export declare const SingBoxHostMapperOperationsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
op: z.ZodLiteral<"copy">;
|
|
28
|
+
from: z.ZodString;
|
|
29
|
+
to: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
op: z.ZodLiteral<"set">;
|
|
32
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
33
|
+
to: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
op: z.ZodLiteral<"unset">;
|
|
36
|
+
to: z.ZodString;
|
|
37
|
+
}, z.core.$strip>], "op">;
|
|
26
38
|
export declare const Base64HostMapperOperationsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
39
|
op: z.ZodLiteral<"copy">;
|
|
28
40
|
from: z.ZodString;
|
|
@@ -84,6 +96,18 @@ export declare const HostMapperSchema: z.ZodObject<{
|
|
|
84
96
|
op: z.ZodLiteral<"unset">;
|
|
85
97
|
to: z.ZodString;
|
|
86
98
|
}, z.core.$strip>], "op">>>;
|
|
99
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
|
+
op: z.ZodLiteral<"copy">;
|
|
101
|
+
from: z.ZodString;
|
|
102
|
+
to: z.ZodString;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
op: z.ZodLiteral<"set">;
|
|
105
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
106
|
+
to: z.ZodString;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
op: z.ZodLiteral<"unset">;
|
|
109
|
+
to: z.ZodString;
|
|
110
|
+
}, z.core.$strip>], "op">>>;
|
|
87
111
|
}, z.core.$strip>;
|
|
88
112
|
export type THostMapper = z.infer<typeof HostMapperSchema>;
|
|
89
113
|
export type THostMapperOperation = z.infer<typeof HostMapperOperationsSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-mapper.schema.d.ts","sourceRoot":"","sources":["../../../../models/host-mapper/host-mapper.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"host-mapper.schema.d.ts","sourceRoot":"","sources":["../../../../models/host-mapper/host-mapper.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiKxB,eAAO,MAAM,kCAAkC;;;;;;;;;;;yBAY7C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;yBAM3C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;yBAa5C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;yBAmC3C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;yBAAqC,CAAC;AAE7E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiGvB,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
|
|
3
|
+
exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.SingBoxHostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const buildFromSchema = () => zod_1.z
|
|
6
6
|
.string()
|
|
@@ -11,12 +11,22 @@ const buildFromSchema = () => zod_1.z
|
|
|
11
11
|
markdownDescription: [
|
|
12
12
|
'Dot-separated path inside the **raw inbound** of the config profile this host belongs to. Array items are addressed by index.',
|
|
13
13
|
'',
|
|
14
|
-
'
|
|
14
|
+
'With a `$host.` prefix the value is read from the **host** itself, after overrides have been resolved – `$host.securityOptions.serverName` holds the SNI that actually went into the config.',
|
|
15
|
+
'',
|
|
16
|
+
'Only a part of the host is readable. Each entry below also opens everything nested under it:',
|
|
17
|
+
'',
|
|
18
|
+
'`address`, `port`, `finalRemark`, `protocol`, `transport`, `security`, `protocolOptions`, `transportOptions`, `securityOptions`, `mux`, `streamOverrides.finalMask`, `streamOverrides.sockopt`, `clientOverrides.serverDescription`, `metadata.remark`, `metadata.tags`, `metadata.inboundTag`',
|
|
19
|
+
'',
|
|
20
|
+
'> If the path resolves to nothing – or points outside the list above – the operation is skipped and the target key is **not** created.',
|
|
15
21
|
].join('\n'),
|
|
16
22
|
examples: [
|
|
17
23
|
'streamSettings.tlsSettings.cipherSuites',
|
|
18
24
|
'streamSettings.tlsSettings.alpn',
|
|
19
25
|
'streamSettings.realitySettings.serverNames.0',
|
|
26
|
+
'$host.address',
|
|
27
|
+
'$host.securityOptions.serverName',
|
|
28
|
+
'$host.transportOptions.path',
|
|
29
|
+
'$host.mux.smux',
|
|
20
30
|
],
|
|
21
31
|
});
|
|
22
32
|
const buildToSchema = (client) => zod_1.z
|
|
@@ -155,6 +165,20 @@ exports.MihomoHostMapperOperationsSchema = buildOperationsSchema({
|
|
|
155
165
|
setSnippet: { to: 'reality-opts.support-x25519mlkem768', value: true },
|
|
156
166
|
unsetSnippet: { to: 'smux' },
|
|
157
167
|
});
|
|
168
|
+
exports.SingBoxHostMapperOperationsSchema = buildOperationsSchema({
|
|
169
|
+
target: 'the generated **outbound**',
|
|
170
|
+
examples: [
|
|
171
|
+
'domain_resolver',
|
|
172
|
+
'multiplex.protocol',
|
|
173
|
+
'packet_encoding',
|
|
174
|
+
'tcp_fast_open',
|
|
175
|
+
'tls.insecure',
|
|
176
|
+
'tls.utls.fingerprint',
|
|
177
|
+
],
|
|
178
|
+
copySnippet: { from: 'streamSettings.realitySettings.serverNames.0', to: 'tls.server_name' },
|
|
179
|
+
setSnippet: { to: 'tls.utls.fingerprint', value: 'chrome' },
|
|
180
|
+
unsetSnippet: { to: 'multiplex' },
|
|
181
|
+
});
|
|
158
182
|
exports.Base64HostMapperOperationsSchema = buildOperationsSchema({
|
|
159
183
|
target: 'the query string of the generated **share link**',
|
|
160
184
|
examples: [
|
|
@@ -247,6 +271,24 @@ exports.HostMapperSchema = zod_1.z
|
|
|
247
271
|
'```',
|
|
248
272
|
].join('\n'),
|
|
249
273
|
}),
|
|
274
|
+
singbox: zod_1.z
|
|
275
|
+
.array(exports.SingBoxHostMapperOperationsSchema)
|
|
276
|
+
.optional()
|
|
277
|
+
.meta({
|
|
278
|
+
title: 'sing-box',
|
|
279
|
+
markdownDescription: [
|
|
280
|
+
'Operations applied to the **outbound** generated for this host in the sing-box subscription. Paths are counted from the root of the outbound.',
|
|
281
|
+
'',
|
|
282
|
+
'sing-box keys are written in snake_case, and the outbound of a Hysteria2 host has a shape of its own.',
|
|
283
|
+
'',
|
|
284
|
+
'```json',
|
|
285
|
+
JSON.stringify([
|
|
286
|
+
{ op: 'set', to: 'tls.utls.fingerprint', value: 'chrome' },
|
|
287
|
+
{ op: 'unset', to: 'multiplex' },
|
|
288
|
+
], null, 2),
|
|
289
|
+
'```',
|
|
290
|
+
].join('\n'),
|
|
291
|
+
}),
|
|
250
292
|
})
|
|
251
293
|
.meta({
|
|
252
294
|
title: 'Host Mapper',
|
|
@@ -255,7 +297,7 @@ exports.HostMapperSchema = zod_1.z
|
|
|
255
297
|
'',
|
|
256
298
|
'Operations run **after** the generator has finished, so they can change or remove anything it produced.',
|
|
257
299
|
'',
|
|
258
|
-
'The source for `copy` is
|
|
300
|
+
'The source for `copy` is the raw inbound of the config profile this host belongs to, or the host itself when the path starts with `$host.`.',
|
|
259
301
|
'',
|
|
260
302
|
'> `to` is never checked against the target client. A misspelled key is written exactly like a real one.',
|
|
261
303
|
].join('\n'),
|
|
@@ -96,6 +96,18 @@ export declare const HostsSchema: z.ZodObject<{
|
|
|
96
96
|
op: z.ZodLiteral<"unset">;
|
|
97
97
|
to: z.ZodString;
|
|
98
98
|
}, z.core.$strip>], "op">>>;
|
|
99
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
|
+
op: z.ZodLiteral<"copy">;
|
|
101
|
+
from: z.ZodString;
|
|
102
|
+
to: z.ZodString;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
op: z.ZodLiteral<"set">;
|
|
105
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
106
|
+
to: z.ZodString;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
op: z.ZodLiteral<"unset">;
|
|
109
|
+
to: z.ZodString;
|
|
110
|
+
}, z.core.$strip>], "op">>>;
|
|
99
111
|
}, z.core.$strip>;
|
|
100
112
|
}, z.core.$strip>;
|
|
101
113
|
//# sourceMappingURL=hosts.schema.d.ts.map
|
|
@@ -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;AAMxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwCtB,CAAC"}
|
|
@@ -301,6 +301,18 @@ export declare const ResolvedProxyConfigBaseSchema: z.ZodObject<{
|
|
|
301
301
|
op: z.ZodLiteral<"unset">;
|
|
302
302
|
to: z.ZodString;
|
|
303
303
|
}, z.core.$strip>], "op">>>;
|
|
304
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
305
|
+
op: z.ZodLiteral<"copy">;
|
|
306
|
+
from: z.ZodString;
|
|
307
|
+
to: z.ZodString;
|
|
308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
309
|
+
op: z.ZodLiteral<"set">;
|
|
310
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
311
|
+
to: z.ZodString;
|
|
312
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
313
|
+
op: z.ZodLiteral<"unset">;
|
|
314
|
+
to: z.ZodString;
|
|
315
|
+
}, z.core.$strip>], "op">>>;
|
|
304
316
|
}, z.core.$strip>;
|
|
305
317
|
}, z.core.$strip>;
|
|
306
318
|
metadata: z.ZodObject<{
|
|
@@ -383,6 +395,18 @@ export declare const ResolvedProxyConfigSchema: z.ZodIntersection<z.ZodIntersect
|
|
|
383
395
|
op: z.ZodLiteral<"unset">;
|
|
384
396
|
to: z.ZodString;
|
|
385
397
|
}, z.core.$strip>], "op">>>;
|
|
398
|
+
singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
399
|
+
op: z.ZodLiteral<"copy">;
|
|
400
|
+
from: z.ZodString;
|
|
401
|
+
to: z.ZodString;
|
|
402
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
403
|
+
op: z.ZodLiteral<"set">;
|
|
404
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
|
|
405
|
+
to: z.ZodString;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
op: z.ZodLiteral<"unset">;
|
|
408
|
+
to: z.ZodString;
|
|
409
|
+
}, z.core.$strip>], "op">>>;
|
|
386
410
|
}, z.core.$strip>;
|
|
387
411
|
}, z.core.$strip>;
|
|
388
412
|
metadata: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolved-proxy-config.schema.d.ts","sourceRoot":"","sources":["../../../models/resolved-proxy-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;iBAK3C,CAAC;AA4BH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAEpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAKtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;iBAKnC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;iBAGzC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAWnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;iBAOvC,CAAC;AAsBH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAKhC,CAAC;AAqCH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQjC,CAAC;AAgBH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;+BAIhC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAanC,CAAC;AAEH,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"resolved-proxy-config.schema.d.ts","sourceRoot":"","sources":["../../../models/resolved-proxy-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;iBAK3C,CAAC;AA4BH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAEpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAKtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;iBAKnC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;iBAGzC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAWnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;iBAOvC,CAAC;AAsBH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAKhC,CAAC;AAqCH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQjC,CAAC;AAgBH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;+BAIhC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAanC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAEP,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
|
|
3
|
+
exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.SingBoxHostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const buildFromSchema = () => zod_1.z
|
|
6
6
|
.string()
|
|
@@ -11,12 +11,22 @@ const buildFromSchema = () => zod_1.z
|
|
|
11
11
|
markdownDescription: [
|
|
12
12
|
'Dot-separated path inside the **raw inbound** of the config profile this host belongs to. Array items are addressed by index.',
|
|
13
13
|
'',
|
|
14
|
-
'
|
|
14
|
+
'With a `$host.` prefix the value is read from the **host** itself, after overrides have been resolved – `$host.securityOptions.serverName` holds the SNI that actually went into the config.',
|
|
15
|
+
'',
|
|
16
|
+
'Only a part of the host is readable. Each entry below also opens everything nested under it:',
|
|
17
|
+
'',
|
|
18
|
+
'`address`, `port`, `finalRemark`, `protocol`, `transport`, `security`, `protocolOptions`, `transportOptions`, `securityOptions`, `mux`, `streamOverrides.finalMask`, `streamOverrides.sockopt`, `clientOverrides.serverDescription`, `metadata.remark`, `metadata.tags`, `metadata.inboundTag`',
|
|
19
|
+
'',
|
|
20
|
+
'> If the path resolves to nothing – or points outside the list above – the operation is skipped and the target key is **not** created.',
|
|
15
21
|
].join('\n'),
|
|
16
22
|
examples: [
|
|
17
23
|
'streamSettings.tlsSettings.cipherSuites',
|
|
18
24
|
'streamSettings.tlsSettings.alpn',
|
|
19
25
|
'streamSettings.realitySettings.serverNames.0',
|
|
26
|
+
'$host.address',
|
|
27
|
+
'$host.securityOptions.serverName',
|
|
28
|
+
'$host.transportOptions.path',
|
|
29
|
+
'$host.mux.smux',
|
|
20
30
|
],
|
|
21
31
|
});
|
|
22
32
|
const buildToSchema = (client) => zod_1.z
|
|
@@ -155,6 +165,20 @@ exports.MihomoHostMapperOperationsSchema = buildOperationsSchema({
|
|
|
155
165
|
setSnippet: { to: 'reality-opts.support-x25519mlkem768', value: true },
|
|
156
166
|
unsetSnippet: { to: 'smux' },
|
|
157
167
|
});
|
|
168
|
+
exports.SingBoxHostMapperOperationsSchema = buildOperationsSchema({
|
|
169
|
+
target: 'the generated **outbound**',
|
|
170
|
+
examples: [
|
|
171
|
+
'domain_resolver',
|
|
172
|
+
'multiplex.protocol',
|
|
173
|
+
'packet_encoding',
|
|
174
|
+
'tcp_fast_open',
|
|
175
|
+
'tls.insecure',
|
|
176
|
+
'tls.utls.fingerprint',
|
|
177
|
+
],
|
|
178
|
+
copySnippet: { from: 'streamSettings.realitySettings.serverNames.0', to: 'tls.server_name' },
|
|
179
|
+
setSnippet: { to: 'tls.utls.fingerprint', value: 'chrome' },
|
|
180
|
+
unsetSnippet: { to: 'multiplex' },
|
|
181
|
+
});
|
|
158
182
|
exports.Base64HostMapperOperationsSchema = buildOperationsSchema({
|
|
159
183
|
target: 'the query string of the generated **share link**',
|
|
160
184
|
examples: [
|
|
@@ -247,6 +271,24 @@ exports.HostMapperSchema = zod_1.z
|
|
|
247
271
|
'```',
|
|
248
272
|
].join('\n'),
|
|
249
273
|
}),
|
|
274
|
+
singbox: zod_1.z
|
|
275
|
+
.array(exports.SingBoxHostMapperOperationsSchema)
|
|
276
|
+
.optional()
|
|
277
|
+
.meta({
|
|
278
|
+
title: 'sing-box',
|
|
279
|
+
markdownDescription: [
|
|
280
|
+
'Operations applied to the **outbound** generated for this host in the sing-box subscription. Paths are counted from the root of the outbound.',
|
|
281
|
+
'',
|
|
282
|
+
'sing-box keys are written in snake_case, and the outbound of a Hysteria2 host has a shape of its own.',
|
|
283
|
+
'',
|
|
284
|
+
'```json',
|
|
285
|
+
JSON.stringify([
|
|
286
|
+
{ op: 'set', to: 'tls.utls.fingerprint', value: 'chrome' },
|
|
287
|
+
{ op: 'unset', to: 'multiplex' },
|
|
288
|
+
], null, 2),
|
|
289
|
+
'```',
|
|
290
|
+
].join('\n'),
|
|
291
|
+
}),
|
|
250
292
|
})
|
|
251
293
|
.meta({
|
|
252
294
|
title: 'Host Mapper',
|
|
@@ -255,7 +297,7 @@ exports.HostMapperSchema = zod_1.z
|
|
|
255
297
|
'',
|
|
256
298
|
'Operations run **after** the generator has finished, so they can change or remove anything it produced.',
|
|
257
299
|
'',
|
|
258
|
-
'The source for `copy` is
|
|
300
|
+
'The source for `copy` is the raw inbound of the config profile this host belongs to, or the host itself when the path starts with `$host.`.',
|
|
259
301
|
'',
|
|
260
302
|
'> `to` is never checked against the target client. A misspelled key is written exactly like a real one.',
|
|
261
303
|
].join('\n'),
|
package/package.json
CHANGED