@remnawave/xtls-sdk 0.11.0 → 0.12.0

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 (28) hide show
  1. package/build/index.d.ts +17 -0
  2. package/build/index.d.ts.map +1 -0
  3. package/build/index.js +19 -0
  4. package/build/src/handler/handler.service.d.ts +33 -1
  5. package/build/src/handler/handler.service.d.ts.map +1 -1
  6. package/build/src/handler/handler.service.js +76 -8
  7. package/build/src/handler/interfaces/add-user/add-hysteria-user.interface.d.ts +8 -0
  8. package/build/src/handler/interfaces/add-user/add-hysteria-user.interface.d.ts.map +1 -0
  9. package/build/src/handler/interfaces/add-user/add-hysteria-user.interface.js +2 -0
  10. package/build/src/handler/interfaces/add-user/index.d.ts +4 -3
  11. package/build/src/handler/interfaces/add-user/index.d.ts.map +1 -1
  12. package/build/src/handler/interfaces/add-user/index.js +4 -3
  13. package/build/src/xray-protos/app/router/config.d.ts +16 -0
  14. package/build/src/xray-protos/app/router/config.d.ts.map +1 -1
  15. package/build/src/xray-protos/app/router/config.js +195 -1
  16. package/build/src/xray-protos/proxy/hysteria/account/config.d.ts +22 -0
  17. package/build/src/xray-protos/proxy/hysteria/account/config.d.ts.map +1 -0
  18. package/build/src/xray-protos/proxy/hysteria/account/config.js +68 -0
  19. package/build/src/xray-protos/proxy/hysteria/config.d.ts +6 -0
  20. package/build/src/xray-protos/proxy/hysteria/config.d.ts.map +1 -1
  21. package/build/src/xray-protos/proxy/hysteria/config.js +58 -1
  22. package/build/src/xray-protos/transport/internet/config.d.ts +24 -0
  23. package/build/src/xray-protos/transport/internet/config.d.ts.map +1 -1
  24. package/build/src/xray-protos/transport/internet/config.js +407 -1
  25. package/package.json +1 -1
  26. package/build/scripts/export-protos.d.ts +0 -2
  27. package/build/scripts/export-protos.d.ts.map +0 -1
  28. package/build/scripts/export-protos.js +0 -132
@@ -0,0 +1,17 @@
1
+ import { Channel, ChannelOptions, ChannelCredentials } from 'nice-grpc';
2
+ import { HandlerService } from './src/handler/handler.service';
3
+ import { RouterService } from './src/router/router.service';
4
+ import { StatsService } from './src/stats/stats.service';
5
+ export interface XtlsApiOptions {
6
+ connectionUrl: string;
7
+ options?: ChannelOptions;
8
+ credentials?: ChannelCredentials;
9
+ }
10
+ export declare class XtlsApi {
11
+ readonly channel: Channel;
12
+ readonly stats: StatsService;
13
+ readonly handler: HandlerService;
14
+ readonly router: RouterService;
15
+ constructor({ connectionUrl, options, credentials }: XtlsApiOptions);
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEvF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,qBAAa,OAAO;IAChB,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,KAAK,EAAE,YAAY,CAAC;IACpC,SAAgB,OAAO,EAAE,cAAc,CAAC;IACxC,SAAgB,MAAM,EAAE,aAAa,CAAC;gBAE1B,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,cAAc;CAStE"}
package/build/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.XtlsApi = void 0;
4
+ const nice_grpc_1 = require("nice-grpc");
5
+ const handler_service_1 = require("./src/handler/handler.service");
6
+ const router_service_1 = require("./src/router/router.service");
7
+ const stats_service_1 = require("./src/stats/stats.service");
8
+ class XtlsApi {
9
+ constructor({ connectionUrl, options, credentials }) {
10
+ this.channel = (0, nice_grpc_1.createChannel)(connectionUrl, credentials, {
11
+ ...options,
12
+ });
13
+ this.stats = new stats_service_1.StatsService(this.channel);
14
+ this.handler = new handler_service_1.HandlerService(this.channel);
15
+ this.router = new router_service_1.RouterService(this.channel);
16
+ return this;
17
+ }
18
+ }
19
+ exports.XtlsApi = XtlsApi;
@@ -1,6 +1,6 @@
1
1
  import { Channel } from 'nice-grpc';
2
+ import { IAddHttpUser, IAddHysteriaUser, IAddShadowsocks2022User, IAddShadowsocksUser, IAddSocksUser, IAddTrojanUser, IAddVlessUser } from './interfaces';
2
3
  import { HandlerServiceClient } from '../xray-protos/app/proxyman/command/command';
3
- import { IAddHttpUser, IAddShadowsocks2022User, IAddShadowsocksUser, IAddSocksUser, IAddTrojanUser, IAddVlessUser } from './interfaces';
4
4
  import { AddUserResponseModel, GetInboundUsersResponseModel, RemoveUserResponseModel } from './models';
5
5
  import { ISdkResponse } from '../common/types/sdk-response';
6
6
  /**
@@ -86,6 +86,38 @@ export declare class HandlerService {
86
86
  * - On failure: An object with `isOk: false` and error details from HANDLER_ERRORS
87
87
  */
88
88
  addHttpUser(data: IAddHttpUser): Promise<ISdkResponse<AddUserResponseModel>>;
89
+ /**
90
+ * Adds a new Hysteria user to a specified inbound handler.
91
+ *
92
+ * @remarks
93
+ * This method adds a user for the Hysteria protocol to an Xray server inbound handler.
94
+ *
95
+ * @param data - The user data for the new Hysteria user.
96
+ * @param data.tag - The tag identifying the inbound handler.
97
+ * @param data.username - The email/username for the user.
98
+ * @param data.level - The user privilege level.
99
+ * @param data.uuid - The authentication string for Hysteria (typically a password).
100
+ *
101
+ * @returns A promise that resolves to an {@link ISdkResponse} containing {@link AddUserResponseModel}.
102
+ *
103
+ * @example
104
+ * ```typescript
105
+ * const handler = new HandlerService(channel);
106
+ * const result = await handler.addHysteriaUser({
107
+ * tag: 'hysteria-inbound',
108
+ * username: 'example@example.com',
109
+ * level: 0,
110
+ * uuid: 'random-password',
111
+ * });
112
+ * if (result.isOk && result.data.success) {
113
+ * // User added successfully
114
+ * }
115
+ * ```
116
+ *
117
+ * @throws An error with details from {@link HANDLER_ERRORS.ADD_USER_ERROR} if the operation fails.
118
+ * Returns `isOk: true` and `success: false` if the user already exists.
119
+ */
120
+ addHysteriaUser(data: IAddHysteriaUser): Promise<ISdkResponse<AddUserResponseModel>>;
89
121
  /**
90
122
  * Removes a user from a specified inbound handler.
91
123
  *
@@ -1 +1 @@
1
- {"version":3,"file":"handler.service.d.ts","sourceRoot":"","sources":["../../../src/handler/handler.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAEH,oBAAoB,EAGvB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACH,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,aAAa,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,oBAAoB,EACpB,4BAA4B,EAC5B,uBAAuB,EAC1B,MAAM,UAAU,CAAC;AAQlB,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D;;GAEG;AACH,qBAAa,cAAc;IAGX,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;gBAEjB,OAAO,EAAE,OAAO;IAI7C;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAoB9F;;;;;;;OAOG;IACU,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAuC7F;;;;;;;OAOG;IACU,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,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O,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAmB7E;;;OAGG;IACH,IAAW,SAAS,IAAI,oBAAoB,CAE3C;CACJ"}
@@ -9,11 +9,12 @@ const command_1 = require("../xray-protos/app/proxyman/command/command");
9
9
  const models_1 = require("./models");
10
10
  const config_1 = require("../xray-protos/proxy/shadowsocks_2022/config");
11
11
  const create_typed_message_1 = __importDefault(require("../common/utils/create-typed-message/create-typed-message"));
12
- const config_2 = require("../xray-protos/proxy/shadowsocks/config");
13
- const config_3 = require("../xray-protos/proxy/trojan/config");
12
+ const config_2 = require("../xray-protos/proxy/hysteria/account/config");
13
+ const config_3 = require("../xray-protos/proxy/shadowsocks/config");
14
+ const config_4 = require("../xray-protos/proxy/trojan/config");
14
15
  const account_1 = require("../xray-protos/proxy/vless/account");
15
- const config_4 = require("../xray-protos/proxy/socks/config");
16
- const config_5 = require("../xray-protos/proxy/http/config");
16
+ const config_5 = require("../xray-protos/proxy/socks/config");
17
+ const config_6 = require("../xray-protos/proxy/http/config");
17
18
  const user_1 = require("../xray-protos/common/protocol/user");
18
19
  const errors_1 = require("../common/errors");
19
20
  /**
@@ -80,7 +81,7 @@ class HandlerService {
80
81
  user: user_1.User.create({
81
82
  email: data.username,
82
83
  level: data.level,
83
- account: (0, create_typed_message_1.default)(config_3.Account, {
84
+ account: (0, create_typed_message_1.default)(config_4.Account, {
84
85
  password: data.password,
85
86
  }),
86
87
  }),
@@ -170,7 +171,7 @@ class HandlerService {
170
171
  user: user_1.User.create({
171
172
  email: data.username,
172
173
  level: data.level,
173
- account: (0, create_typed_message_1.default)(config_2.Account, {
174
+ account: (0, create_typed_message_1.default)(config_3.Account, {
174
175
  password: data.password,
175
176
  cipherType: data.cipherType,
176
177
  ivCheck: data.ivCheck,
@@ -260,7 +261,7 @@ class HandlerService {
260
261
  user: user_1.User.create({
261
262
  email: data.username,
262
263
  level: data.level,
263
- account: (0, create_typed_message_1.default)(config_4.Account, {
264
+ account: (0, create_typed_message_1.default)(config_5.Account, {
264
265
  username: data.socks_username,
265
266
  password: data.socks_password,
266
267
  }),
@@ -305,7 +306,7 @@ class HandlerService {
305
306
  user: user_1.User.create({
306
307
  email: data.username,
307
308
  level: data.level,
308
- account: (0, create_typed_message_1.default)(config_5.Account, {
309
+ account: (0, create_typed_message_1.default)(config_6.Account, {
309
310
  username: data.http_username,
310
311
  password: data.http_password,
311
312
  }),
@@ -334,6 +335,73 @@ class HandlerService {
334
335
  };
335
336
  }
336
337
  }
338
+ /**
339
+ * Adds a new Hysteria user to a specified inbound handler.
340
+ *
341
+ * @remarks
342
+ * This method adds a user for the Hysteria protocol to an Xray server inbound handler.
343
+ *
344
+ * @param data - The user data for the new Hysteria user.
345
+ * @param data.tag - The tag identifying the inbound handler.
346
+ * @param data.username - The email/username for the user.
347
+ * @param data.level - The user privilege level.
348
+ * @param data.uuid - The authentication string for Hysteria (typically a password).
349
+ *
350
+ * @returns A promise that resolves to an {@link ISdkResponse} containing {@link AddUserResponseModel}.
351
+ *
352
+ * @example
353
+ * ```typescript
354
+ * const handler = new HandlerService(channel);
355
+ * const result = await handler.addHysteriaUser({
356
+ * tag: 'hysteria-inbound',
357
+ * username: 'example@example.com',
358
+ * level: 0,
359
+ * uuid: 'random-password',
360
+ * });
361
+ * if (result.isOk && result.data.success) {
362
+ * // User added successfully
363
+ * }
364
+ * ```
365
+ *
366
+ * @throws An error with details from {@link HANDLER_ERRORS.ADD_USER_ERROR} if the operation fails.
367
+ * Returns `isOk: true` and `success: false` if the user already exists.
368
+ */
369
+ async addHysteriaUser(data) {
370
+ try {
371
+ await this.client.alterInbound({
372
+ tag: data.tag,
373
+ operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
374
+ user: user_1.User.create({
375
+ email: data.username,
376
+ level: data.level,
377
+ account: (0, create_typed_message_1.default)(config_2.Account, {
378
+ auth: data.uuid,
379
+ }),
380
+ }),
381
+ }),
382
+ });
383
+ return {
384
+ isOk: true,
385
+ data: new models_1.AddUserResponseModel(true),
386
+ };
387
+ }
388
+ catch (error) {
389
+ let message = '';
390
+ if (error instanceof Error) {
391
+ message = error.message;
392
+ }
393
+ if (message.includes('already exists')) {
394
+ return {
395
+ isOk: true,
396
+ data: new models_1.AddUserResponseModel(false),
397
+ };
398
+ }
399
+ return {
400
+ isOk: false,
401
+ ...errors_1.HANDLER_ERRORS.ADD_USER_ERROR(message),
402
+ };
403
+ }
404
+ }
337
405
  /**
338
406
  * Removes a user from a specified inbound handler.
339
407
  *
@@ -0,0 +1,8 @@
1
+ export interface IAddHysteriaUser {
2
+ username: string;
3
+ level: number;
4
+ uuid: string;
5
+ flow: 'xtls-rprx-vision' | '';
6
+ tag: string;
7
+ }
8
+ //# sourceMappingURL=add-hysteria-user.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-hysteria-user.interface.d.ts","sourceRoot":"","sources":["../../../../../src/handler/interfaces/add-user/add-hysteria-user.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,kBAAkB,GAAG,EAAE,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,8 @@
1
- export * from './add-trojan-user.interface';
2
- export * from './add-vless-user.interface';
1
+ export * from './add-http-user.interface';
2
+ export * from './add-hysteria-user.interface';
3
3
  export * from './add-shadowsocks-user.interface';
4
4
  export * from './add-shadowsocks2022-user.interface';
5
5
  export * from './add-socks-user.interface';
6
- export * from './add-http-user.interface';
6
+ export * from './add-trojan-user.interface';
7
+ export * from './add-vless-user.interface';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/handler/interfaces/add-user/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/handler/interfaces/add-user/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC"}
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./add-trojan-user.interface"), exports);
18
- __exportStar(require("./add-vless-user.interface"), exports);
17
+ __exportStar(require("./add-http-user.interface"), exports);
18
+ __exportStar(require("./add-hysteria-user.interface"), exports);
19
19
  __exportStar(require("./add-shadowsocks-user.interface"), exports);
20
20
  __exportStar(require("./add-shadowsocks2022-user.interface"), exports);
21
21
  __exportStar(require("./add-socks-user.interface"), exports);
22
- __exportStar(require("./add-http-user.interface"), exports);
22
+ __exportStar(require("./add-trojan-user.interface"), exports);
23
+ __exportStar(require("./add-vless-user.interface"), exports);
@@ -97,12 +97,26 @@ export interface RoutingRule {
97
97
  localPortList: PortList | undefined;
98
98
  vlessRouteList: PortList | undefined;
99
99
  process: string[];
100
+ webhook: WebhookConfig | undefined;
100
101
  }
101
102
  export interface RoutingRule_AttributesEntry {
102
103
  $type: "xray.app.router.RoutingRule.AttributesEntry";
103
104
  key: string;
104
105
  value: string;
105
106
  }
107
+ export interface WebhookConfig {
108
+ $type: "xray.app.router.WebhookConfig";
109
+ url: string;
110
+ deduplication: number;
111
+ headers: {
112
+ [key: string]: string;
113
+ };
114
+ }
115
+ export interface WebhookConfig_HeadersEntry {
116
+ $type: "xray.app.router.WebhookConfig.HeadersEntry";
117
+ key: string;
118
+ value: string;
119
+ }
106
120
  export interface BalancingRule {
107
121
  $type: "xray.app.router.BalancingRule";
108
122
  tag: string;
@@ -156,6 +170,8 @@ export declare const GeoSite: MessageFns<GeoSite, "xray.app.router.GeoSite">;
156
170
  export declare const GeoSiteList: MessageFns<GeoSiteList, "xray.app.router.GeoSiteList">;
157
171
  export declare const RoutingRule: MessageFns<RoutingRule, "xray.app.router.RoutingRule">;
158
172
  export declare const RoutingRule_AttributesEntry: MessageFns<RoutingRule_AttributesEntry, "xray.app.router.RoutingRule.AttributesEntry">;
173
+ export declare const WebhookConfig: MessageFns<WebhookConfig, "xray.app.router.WebhookConfig">;
174
+ export declare const WebhookConfig_HeadersEntry: MessageFns<WebhookConfig_HeadersEntry, "xray.app.router.WebhookConfig.HeadersEntry">;
159
175
  export declare const BalancingRule: MessageFns<BalancingRule, "xray.app.router.BalancingRule">;
160
176
  export declare const StrategyWeight: MessageFns<StrategyWeight, "xray.app.router.StrategyWeight">;
161
177
  export declare const StrategyLeastLoadConfig: MessageFns<StrategyLeastLoadConfig, "xray.app.router.StrategyLeastLoadConfig">;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/xray-protos/app/router/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAkC,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGjE,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,mCAAmC;AACnC,MAAM,WAAW,M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astLoadConfig = exports.StrategyWeight = exports.BalancingRule = exports.RoutingRule_AttributesEntry = exports.RoutingRule = exports.GeoSiteList = exports.GeoSite = exports.GeoIPList = exports.GeoIP = exports.CIDR = exports.Domain_Attribute = exports.Domain = exports.Config_DomainStrategy = exports.Domain_Type = exports.protobufPackage = void 0;
8
+ exports.Config = exports.StrategyLeastLoadConfig = exports.StrategyWeight = exports.BalancingRule = exports.WebhookConfig_HeadersEntry = exports.WebhookConfig = exports.RoutingRule_AttributesEntry = exports.RoutingRule = exports.GeoSiteList = exports.GeoSite = exports.GeoIPList = exports.GeoIP = exports.CIDR = exports.Domain_Attribute = exports.Domain = exports.Config_DomainStrategy = exports.Domain_Type = exports.protobufPackage = void 0;
9
9
  exports.domain_TypeFromJSON = domain_TypeFromJSON;
10
10
  exports.domain_TypeToJSON = domain_TypeToJSON;
11
11
  exports.config_DomainStrategyFromJSON = config_DomainStrategyFromJSON;
@@ -659,6 +659,7 @@ function createBaseRoutingRule() {
659
659
  localPortList: undefined,
660
660
  vlessRouteList: undefined,
661
661
  process: [],
662
+ webhook: undefined,
662
663
  };
663
664
  }
664
665
  exports.RoutingRule = {
@@ -721,6 +722,9 @@ exports.RoutingRule = {
721
722
  for (const v of message.process) {
722
723
  writer.uint32(170).string(v);
723
724
  }
725
+ if (message.webhook !== undefined) {
726
+ exports.WebhookConfig.encode(message.webhook, writer.uint32(178).fork()).join();
727
+ }
724
728
  return writer;
725
729
  },
726
730
  decode(input, length) {
@@ -859,6 +863,13 @@ exports.RoutingRule = {
859
863
  message.process.push(reader.string());
860
864
  continue;
861
865
  }
866
+ case 22: {
867
+ if (tag !== 178) {
868
+ break;
869
+ }
870
+ message.webhook = exports.WebhookConfig.decode(reader, reader.uint32());
871
+ continue;
872
+ }
862
873
  }
863
874
  if ((tag & 7) === 4 || tag === 0) {
864
875
  break;
@@ -936,6 +947,7 @@ exports.RoutingRule = {
936
947
  process: globalThis.Array.isArray(object?.process)
937
948
  ? object.process.map((e) => globalThis.String(e))
938
949
  : [],
950
+ webhook: isSet(object.webhook) ? exports.WebhookConfig.fromJSON(object.webhook) : undefined,
939
951
  };
940
952
  },
941
953
  toJSON(message) {
@@ -997,6 +1009,9 @@ exports.RoutingRule = {
997
1009
  if (message.process?.length) {
998
1010
  obj.process = message.process;
999
1011
  }
1012
+ if (message.webhook !== undefined) {
1013
+ obj.webhook = exports.WebhookConfig.toJSON(message.webhook);
1014
+ }
1000
1015
  return obj;
1001
1016
  },
1002
1017
  create(base) {
@@ -1034,6 +1049,9 @@ exports.RoutingRule = {
1034
1049
  ? port_1.PortList.fromPartial(object.vlessRouteList)
1035
1050
  : undefined;
1036
1051
  message.process = object.process?.map((e) => e) || [];
1052
+ message.webhook = (object.webhook !== undefined && object.webhook !== null)
1053
+ ? exports.WebhookConfig.fromPartial(object.webhook)
1054
+ : undefined;
1037
1055
  return message;
1038
1056
  },
1039
1057
  };
@@ -1109,6 +1127,182 @@ exports.RoutingRule_AttributesEntry = {
1109
1127
  },
1110
1128
  };
1111
1129
  typeRegistry_1.messageTypeRegistry.set(exports.RoutingRule_AttributesEntry.$type, exports.RoutingRule_AttributesEntry);
1130
+ function createBaseWebhookConfig() {
1131
+ return { $type: "xray.app.router.WebhookConfig", url: "", deduplication: 0, headers: {} };
1132
+ }
1133
+ exports.WebhookConfig = {
1134
+ $type: "xray.app.router.WebhookConfig",
1135
+ encode(message, writer = new wire_1.BinaryWriter()) {
1136
+ if (message.url !== "") {
1137
+ writer.uint32(10).string(message.url);
1138
+ }
1139
+ if (message.deduplication !== 0) {
1140
+ writer.uint32(16).uint32(message.deduplication);
1141
+ }
1142
+ globalThis.Object.entries(message.headers).forEach(([key, value]) => {
1143
+ exports.WebhookConfig_HeadersEntry.encode({ $type: "xray.app.router.WebhookConfig.HeadersEntry", key: key, value }, writer.uint32(26).fork()).join();
1144
+ });
1145
+ return writer;
1146
+ },
1147
+ decode(input, length) {
1148
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1149
+ const end = length === undefined ? reader.len : reader.pos + length;
1150
+ const message = createBaseWebhookConfig();
1151
+ while (reader.pos < end) {
1152
+ const tag = reader.uint32();
1153
+ switch (tag >>> 3) {
1154
+ case 1: {
1155
+ if (tag !== 10) {
1156
+ break;
1157
+ }
1158
+ message.url = reader.string();
1159
+ continue;
1160
+ }
1161
+ case 2: {
1162
+ if (tag !== 16) {
1163
+ break;
1164
+ }
1165
+ message.deduplication = reader.uint32();
1166
+ continue;
1167
+ }
1168
+ case 3: {
1169
+ if (tag !== 26) {
1170
+ break;
1171
+ }
1172
+ const entry3 = exports.WebhookConfig_HeadersEntry.decode(reader, reader.uint32());
1173
+ if (entry3.value !== undefined) {
1174
+ message.headers[entry3.key] = entry3.value;
1175
+ }
1176
+ continue;
1177
+ }
1178
+ }
1179
+ if ((tag & 7) === 4 || tag === 0) {
1180
+ break;
1181
+ }
1182
+ reader.skip(tag & 7);
1183
+ }
1184
+ return message;
1185
+ },
1186
+ fromJSON(object) {
1187
+ return {
1188
+ $type: exports.WebhookConfig.$type,
1189
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
1190
+ deduplication: isSet(object.deduplication) ? globalThis.Number(object.deduplication) : 0,
1191
+ headers: isObject(object.headers)
1192
+ ? globalThis.Object.entries(object.headers).reduce((acc, [key, value]) => {
1193
+ acc[key] = globalThis.String(value);
1194
+ return acc;
1195
+ }, {})
1196
+ : {},
1197
+ };
1198
+ },
1199
+ toJSON(message) {
1200
+ const obj = {};
1201
+ if (message.url !== "") {
1202
+ obj.url = message.url;
1203
+ }
1204
+ if (message.deduplication !== 0) {
1205
+ obj.deduplication = Math.round(message.deduplication);
1206
+ }
1207
+ if (message.headers) {
1208
+ const entries = globalThis.Object.entries(message.headers);
1209
+ if (entries.length > 0) {
1210
+ obj.headers = {};
1211
+ entries.forEach(([k, v]) => {
1212
+ obj.headers[k] = v;
1213
+ });
1214
+ }
1215
+ }
1216
+ return obj;
1217
+ },
1218
+ create(base) {
1219
+ return exports.WebhookConfig.fromPartial(base ?? {});
1220
+ },
1221
+ fromPartial(object) {
1222
+ const message = createBaseWebhookConfig();
1223
+ message.url = object.url ?? "";
1224
+ message.deduplication = object.deduplication ?? 0;
1225
+ message.headers = globalThis.Object.entries(object.headers ?? {}).reduce((acc, [key, value]) => {
1226
+ if (value !== undefined) {
1227
+ acc[key] = globalThis.String(value);
1228
+ }
1229
+ return acc;
1230
+ }, {});
1231
+ return message;
1232
+ },
1233
+ };
1234
+ typeRegistry_1.messageTypeRegistry.set(exports.WebhookConfig.$type, exports.WebhookConfig);
1235
+ function createBaseWebhookConfig_HeadersEntry() {
1236
+ return { $type: "xray.app.router.WebhookConfig.HeadersEntry", key: "", value: "" };
1237
+ }
1238
+ exports.WebhookConfig_HeadersEntry = {
1239
+ $type: "xray.app.router.WebhookConfig.HeadersEntry",
1240
+ encode(message, writer = new wire_1.BinaryWriter()) {
1241
+ if (message.key !== "") {
1242
+ writer.uint32(10).string(message.key);
1243
+ }
1244
+ if (message.value !== "") {
1245
+ writer.uint32(18).string(message.value);
1246
+ }
1247
+ return writer;
1248
+ },
1249
+ decode(input, length) {
1250
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1251
+ const end = length === undefined ? reader.len : reader.pos + length;
1252
+ const message = createBaseWebhookConfig_HeadersEntry();
1253
+ while (reader.pos < end) {
1254
+ const tag = reader.uint32();
1255
+ switch (tag >>> 3) {
1256
+ case 1: {
1257
+ if (tag !== 10) {
1258
+ break;
1259
+ }
1260
+ message.key = reader.string();
1261
+ continue;
1262
+ }
1263
+ case 2: {
1264
+ if (tag !== 18) {
1265
+ break;
1266
+ }
1267
+ message.value = reader.string();
1268
+ continue;
1269
+ }
1270
+ }
1271
+ if ((tag & 7) === 4 || tag === 0) {
1272
+ break;
1273
+ }
1274
+ reader.skip(tag & 7);
1275
+ }
1276
+ return message;
1277
+ },
1278
+ fromJSON(object) {
1279
+ return {
1280
+ $type: exports.WebhookConfig_HeadersEntry.$type,
1281
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
1282
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
1283
+ };
1284
+ },
1285
+ toJSON(message) {
1286
+ const obj = {};
1287
+ if (message.key !== "") {
1288
+ obj.key = message.key;
1289
+ }
1290
+ if (message.value !== "") {
1291
+ obj.value = message.value;
1292
+ }
1293
+ return obj;
1294
+ },
1295
+ create(base) {
1296
+ return exports.WebhookConfig_HeadersEntry.fromPartial(base ?? {});
1297
+ },
1298
+ fromPartial(object) {
1299
+ const message = createBaseWebhookConfig_HeadersEntry();
1300
+ message.key = object.key ?? "";
1301
+ message.value = object.value ?? "";
1302
+ return message;
1303
+ },
1304
+ };
1305
+ typeRegistry_1.messageTypeRegistry.set(exports.WebhookConfig_HeadersEntry.$type, exports.WebhookConfig_HeadersEntry);
1112
1306
  function createBaseBalancingRule() {
1113
1307
  return {
1114
1308
  $type: "xray.app.router.BalancingRule",
@@ -0,0 +1,22 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "xray.proxy.hysteria.account";
3
+ export interface Account {
4
+ $type: "xray.proxy.hysteria.account.Account";
5
+ auth: string;
6
+ }
7
+ export declare const Account: MessageFns<Account, "xray.proxy.hysteria.account.Account">;
8
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
9
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
10
+ [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
11
+ } : Partial<T>;
12
+ export interface MessageFns<T, V extends string> {
13
+ readonly $type: V;
14
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
15
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
16
+ fromJSON(object: any): T;
17
+ toJSON(message: T): unknown;
18
+ create(base?: DeepPartial<T>): T;
19
+ fromPartial(object: DeepPartial<T>): T;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/xray-protos/proxy/hysteria/account/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGrE,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,qCAAqC,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd;AAMD,eAAO,MAAM,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,qCAAqC,CAsD9E,CAAC;AAIF,KAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAC9C,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACvE,OAAO,CAAC,CAAC,CAAC,CAAC;AAMf,MAAM,WAAW,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM;IAC7C,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAClB,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACxD,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