@remnawave/xtls-sdk 0.1.0 → 0.1.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/LICENCE +661 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/src/common/errors/router/index.d.ts +2 -0
- package/build/src/common/errors/router/index.d.ts.map +1 -0
- package/build/src/common/errors/router/index.js +17 -0
- package/build/src/common/errors/router/router.errors.d.ts +15 -0
- package/build/src/common/errors/router/router.errors.d.ts.map +1 -0
- package/build/src/common/errors/router/router.errors.js +14 -0
- package/build/src/router/interfaces/add-source-ip-rule.interface.d.ts +8 -0
- package/build/src/router/interfaces/add-source-ip-rule.interface.d.ts.map +1 -0
- package/build/src/router/interfaces/add-source-ip-rule.interface.js +2 -0
- package/build/src/router/interfaces/index.d.ts +3 -0
- package/build/src/router/interfaces/index.d.ts.map +1 -0
- package/build/src/router/interfaces/index.js +18 -0
- package/build/src/router/interfaces/remove-rule-by-rule-tag.interface.d.ts +4 -0
- package/build/src/router/interfaces/remove-rule-by-rule-tag.interface.d.ts.map +1 -0
- package/build/src/router/interfaces/remove-rule-by-rule-tag.interface.js +2 -0
- package/build/src/router/models/add-source-ip-rule/add-source-ip-rule.response.model.d.ts +5 -0
- package/build/src/router/models/add-source-ip-rule/add-source-ip-rule.response.model.d.ts.map +1 -0
- package/build/src/router/models/add-source-ip-rule/add-source-ip-rule.response.model.js +9 -0
- package/build/src/router/models/add-source-ip-rule/index.d.ts +2 -0
- package/build/src/router/models/add-source-ip-rule/index.d.ts.map +1 -0
- package/build/src/router/models/add-source-ip-rule/index.js +17 -0
- package/build/src/router/models/index.d.ts +2 -0
- package/build/src/router/models/index.d.ts.map +1 -0
- package/build/src/router/models/index.js +17 -0
- package/build/src/router/models/remove-rule-by-rule-tag/index.d.ts +2 -0
- package/build/src/router/models/remove-rule-by-rule-tag/index.d.ts.map +1 -0
- package/build/src/router/models/remove-rule-by-rule-tag/index.js +17 -0
- package/build/src/router/models/remove-rule-by-rule-tag/remove-rule-by-rule-tag.response.model.d.ts +5 -0
- package/build/src/router/models/remove-rule-by-rule-tag/remove-rule-by-rule-tag.response.model.d.ts.map +1 -0
- package/build/src/router/models/remove-rule-by-rule-tag/remove-rule-by-rule-tag.response.model.js +9 -0
- package/build/src/router/router.service.d.ts +37 -0
- package/build/src/router/router.service.d.ts.map +1 -0
- package/build/src/router/router.service.js +96 -0
- package/build/src/xray-protos/app/router/command/command.d.ts +222 -0
- package/build/src/xray-protos/app/router/command/command.d.ts.map +1 -0
- package/build/src/xray-protos/app/router/command/command.js +1235 -0
- package/build/src/xray-protos/app/router/config.d.ts +176 -0
- package/build/src/xray-protos/app/router/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/router/config.js +1484 -0
- package/package.json +4 -6
package/build/index.js
CHANGED
|
@@ -4,11 +4,13 @@ exports.XtlsApi = void 0;
|
|
|
4
4
|
const nice_grpc_1 = require("nice-grpc");
|
|
5
5
|
const stats_service_1 = require("./src/stats/stats.service");
|
|
6
6
|
const handler_service_1 = require("./src/handler/handler.service");
|
|
7
|
+
const router_service_1 = require("./src/router/router.service");
|
|
7
8
|
class XtlsApi {
|
|
8
9
|
constructor(ip, port) {
|
|
9
10
|
this.channel = (0, nice_grpc_1.createChannel)(`${ip}:${port}`);
|
|
10
11
|
this.stats = new stats_service_1.StatsService(this.channel);
|
|
11
12
|
this.handler = new handler_service_1.HandlerService(this.channel);
|
|
13
|
+
this.router = new router_service_1.RouterService(this.channel);
|
|
12
14
|
return this;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/errors/router/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./router.errors"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const ROUTER_ERRORS: {
|
|
2
|
+
readonly UNKNOWN_ERROR: {
|
|
3
|
+
readonly code: "A001";
|
|
4
|
+
readonly message: "Unexpected error";
|
|
5
|
+
};
|
|
6
|
+
readonly ADD_SOURCE_IP_RULE_ERROR: (message: string) => {
|
|
7
|
+
code: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
readonly REMOVE_RULE_BY_RULE_TAG_ERROR: (message: string) => {
|
|
11
|
+
code: string;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=router.errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.errors.d.ts","sourceRoot":"","sources":["../../../../../src/common/errors/router/router.errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;iDAEc,MAAM;;;;sDAID,MAAM;;;;CAIzC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROUTER_ERRORS = void 0;
|
|
4
|
+
exports.ROUTER_ERRORS = {
|
|
5
|
+
UNKNOWN_ERROR: { code: 'A001', message: 'Unexpected error' },
|
|
6
|
+
ADD_SOURCE_IP_RULE_ERROR: (message) => ({
|
|
7
|
+
code: 'A002',
|
|
8
|
+
message: `Error adding source ip rule: ${message}`,
|
|
9
|
+
}),
|
|
10
|
+
REMOVE_RULE_BY_RULE_TAG_ERROR: (message) => ({
|
|
11
|
+
code: 'A003',
|
|
12
|
+
message: `Error removing rule by rule tag: ${message}`,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-source-ip-rule.interface.d.ts","sourceRoot":"","sources":["../../../../src/router/interfaces/add-source-ip-rule.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/router/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-source-ip-rule.interface"), exports);
|
|
18
|
+
__exportStar(require("./remove-rule-by-rule-tag.interface"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-rule-by-rule-tag.interface.d.ts","sourceRoot":"","sources":["../../../../src/router/interfaces/remove-rule-by-rule-tag.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-source-ip-rule.response.model.d.ts","sourceRoot":"","sources":["../../../../../src/router/models/add-source-ip-rule/add-source-ip-rule.response.model.ts"],"names":[],"mappings":"AAAA,qBAAa,4BAA4B;IAC9B,OAAO,EAAE,OAAO,CAAC;gBACZ,OAAO,EAAE,OAAO;CAG/B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddSourceIpRuleResponseModel = void 0;
|
|
4
|
+
class AddSourceIpRuleResponseModel {
|
|
5
|
+
constructor(isAdded) {
|
|
6
|
+
this.isAdded = isAdded;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.AddSourceIpRuleResponseModel = AddSourceIpRuleResponseModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/router/models/add-source-ip-rule/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-source-ip-rule.response.model"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/router/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-source-ip-rule"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/router/models/remove-rule-by-rule-tag/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./remove-rule-by-rule-tag.response.model"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-rule-by-rule-tag.response.model.d.ts","sourceRoot":"","sources":["../../../../../src/router/models/remove-rule-by-rule-tag/remove-rule-by-rule-tag.response.model.ts"],"names":[],"mappings":"AAAA,qBAAa,gCAAgC;IAClC,SAAS,EAAE,OAAO,CAAC;gBACd,SAAS,EAAE,OAAO;CAGjC"}
|
package/build/src/router/models/remove-rule-by-rule-tag/remove-rule-by-rule-tag.response.model.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemoveRuleByRuleTagResponseModel = void 0;
|
|
4
|
+
class RemoveRuleByRuleTagResponseModel {
|
|
5
|
+
constructor(isRemoved) {
|
|
6
|
+
this.isRemoved = isRemoved;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.RemoveRuleByRuleTagResponseModel = RemoveRuleByRuleTagResponseModel;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Channel } from 'nice-grpc';
|
|
2
|
+
import { ISdkResponse } from '../common/types/sdk-response';
|
|
3
|
+
import { IAddSourceIpRule, IRemoveRuleByRuleTag } from './interfaces';
|
|
4
|
+
import { AddSourceIpRuleResponseModel } from './models';
|
|
5
|
+
import { RemoveRuleByRuleTagResponseModel } from './models/remove-rule-by-rule-tag';
|
|
6
|
+
/**
|
|
7
|
+
* Service for managing routing rules in XRAY/XTLS
|
|
8
|
+
* RoutingService is required (enable on XRay Config) to add/remove routing rules.
|
|
9
|
+
*/
|
|
10
|
+
export declare class RouterService {
|
|
11
|
+
private readonly channel;
|
|
12
|
+
private readonly client;
|
|
13
|
+
/**
|
|
14
|
+
* Creates an instance of RouterService
|
|
15
|
+
* @param channel - The gRPC channel to use for communication
|
|
16
|
+
*/
|
|
17
|
+
constructor(channel: Channel);
|
|
18
|
+
/**
|
|
19
|
+
* Adds a new routing rule based on source IP address
|
|
20
|
+
* @param dto - Data transfer object containing rule configuration
|
|
21
|
+
* @param dto.ruleTag - Unique identifier for the rule
|
|
22
|
+
* @param dto.outbound - Outbound tag to route matched traffic
|
|
23
|
+
* @param dto.ip - Source IP address to match
|
|
24
|
+
* @param dto.append - Whether to append the rule or replace existing rules
|
|
25
|
+
* @param dto.inbound - Optional inbound tag to match
|
|
26
|
+
* @returns Promise resolving to response indicating success or failure
|
|
27
|
+
*/
|
|
28
|
+
addSrcIpRule(dto: IAddSourceIpRule): Promise<ISdkResponse<AddSourceIpRuleResponseModel>>;
|
|
29
|
+
/**
|
|
30
|
+
* Removes a routing rule by its tag
|
|
31
|
+
* @param dto - Data transfer object containing rule tag
|
|
32
|
+
* @param dto.ruleTag - Tag of the rule to remove
|
|
33
|
+
* @returns Promise resolving to response indicating success or failure
|
|
34
|
+
*/
|
|
35
|
+
removeRuleByRuleTag(dto: IRemoveRuleByRuleTag): Promise<ISdkResponse<RemoveRuleByRuleTagResponseModel>>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=router.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.service.d.ts","sourceRoot":"","sources":["../../../src/router/router.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW,CAAC;AAMlD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEpF;;;GAGG;AACH,qBAAa,aAAa;IAOV,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAE9C;;;OAGG;gBAC0B,OAAO,EAAE,OAAO;IAI7C;;;;;;;;;OASG;IACU,YAAY,CACrB,GAAG,EAAE,gBAAgB,GACtB,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAiCtD;;;;;OAKG;IACU,mBAAmB,CAC5B,GAAG,EAAE,oBAAoB,GAC1B,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;CAqB7D"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RouterService = void 0;
|
|
7
|
+
const nice_grpc_1 = require("nice-grpc");
|
|
8
|
+
const command_1 = require("../xray-protos/app/router/command/command");
|
|
9
|
+
const create_typed_message_1 = __importDefault(require("../common/utils/create-typed-message/create-typed-message"));
|
|
10
|
+
const config_1 = require("../xray-protos/app/router/config");
|
|
11
|
+
const models_1 = require("./models");
|
|
12
|
+
const router_errors_1 = require("../common/errors/router/router.errors");
|
|
13
|
+
const remove_rule_by_rule_tag_1 = require("./models/remove-rule-by-rule-tag");
|
|
14
|
+
/**
|
|
15
|
+
* Service for managing routing rules in XRAY/XTLS
|
|
16
|
+
* RoutingService is required (enable on XRay Config) to add/remove routing rules.
|
|
17
|
+
*/
|
|
18
|
+
class RouterService {
|
|
19
|
+
/**
|
|
20
|
+
* Creates an instance of RouterService
|
|
21
|
+
* @param channel - The gRPC channel to use for communication
|
|
22
|
+
*/
|
|
23
|
+
constructor(channel) {
|
|
24
|
+
this.channel = channel;
|
|
25
|
+
this.client = (0, nice_grpc_1.createClient)(command_1.RoutingServiceDefinition, channel);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Adds a new routing rule based on source IP address
|
|
29
|
+
* @param dto - Data transfer object containing rule configuration
|
|
30
|
+
* @param dto.ruleTag - Unique identifier for the rule
|
|
31
|
+
* @param dto.outbound - Outbound tag to route matched traffic
|
|
32
|
+
* @param dto.ip - Source IP address to match
|
|
33
|
+
* @param dto.append - Whether to append the rule or replace existing rules
|
|
34
|
+
* @param dto.inbound - Optional inbound tag to match
|
|
35
|
+
* @returns Promise resolving to response indicating success or failure
|
|
36
|
+
*/
|
|
37
|
+
async addSrcIpRule(dto) {
|
|
38
|
+
try {
|
|
39
|
+
const routingRule = {
|
|
40
|
+
ruleTag: dto.ruleTag,
|
|
41
|
+
outboundTag: dto.outbound,
|
|
42
|
+
source: [dto.ip],
|
|
43
|
+
inboundTag: dto.inbound ? [dto.inbound] : [''],
|
|
44
|
+
type: 'field',
|
|
45
|
+
};
|
|
46
|
+
await this.client.addRule({
|
|
47
|
+
config: (0, create_typed_message_1.default)(config_1.Config, {
|
|
48
|
+
rule: [routingRule],
|
|
49
|
+
}),
|
|
50
|
+
shouldAppend: dto.append,
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
isOk: true,
|
|
54
|
+
data: new models_1.AddSourceIpRuleResponseModel(true),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
let message = '';
|
|
59
|
+
if (error instanceof Error) {
|
|
60
|
+
message = error.message;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
isOk: false,
|
|
64
|
+
...router_errors_1.ROUTER_ERRORS.ADD_SOURCE_IP_RULE_ERROR(message),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Removes a routing rule by its tag
|
|
70
|
+
* @param dto - Data transfer object containing rule tag
|
|
71
|
+
* @param dto.ruleTag - Tag of the rule to remove
|
|
72
|
+
* @returns Promise resolving to response indicating success or failure
|
|
73
|
+
*/
|
|
74
|
+
async removeRuleByRuleTag(dto) {
|
|
75
|
+
try {
|
|
76
|
+
await this.client.removeRule({
|
|
77
|
+
ruleTag: dto.ruleTag,
|
|
78
|
+
});
|
|
79
|
+
return {
|
|
80
|
+
isOk: true,
|
|
81
|
+
data: new remove_rule_by_rule_tag_1.RemoveRuleByRuleTagResponseModel(true),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
let message = '';
|
|
86
|
+
if (error instanceof Error) {
|
|
87
|
+
message = error.message;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
isOk: false,
|
|
91
|
+
...router_errors_1.ROUTER_ERRORS.REMOVE_RULE_BY_RULE_TAG_ERROR(message),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.RouterService = RouterService;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { type CallContext, type CallOptions } from "nice-grpc-common";
|
|
3
|
+
import { Network } from "../../../common/net/network";
|
|
4
|
+
import { TypedMessage } from "../../../common/serial/typed_message";
|
|
5
|
+
export declare const protobufPackage = "xray.app.router.command";
|
|
6
|
+
/**
|
|
7
|
+
* RoutingContext is the context with information relative to routing process.
|
|
8
|
+
* It conforms to the structure of xray.features.routing.Context and
|
|
9
|
+
* xray.features.routing.Route.
|
|
10
|
+
*/
|
|
11
|
+
export interface RoutingContext {
|
|
12
|
+
$type: "xray.app.router.command.RoutingContext";
|
|
13
|
+
InboundTag: string;
|
|
14
|
+
Network: Network;
|
|
15
|
+
SourceIPs: Uint8Array[];
|
|
16
|
+
TargetIPs: Uint8Array[];
|
|
17
|
+
SourcePort: number;
|
|
18
|
+
TargetPort: number;
|
|
19
|
+
TargetDomain: string;
|
|
20
|
+
Protocol: string;
|
|
21
|
+
User: string;
|
|
22
|
+
Attributes: {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
};
|
|
25
|
+
OutboundGroupTags: string[];
|
|
26
|
+
OutboundTag: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RoutingContext_AttributesEntry {
|
|
29
|
+
$type: "xray.app.router.command.RoutingContext.AttributesEntry";
|
|
30
|
+
key: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* SubscribeRoutingStatsRequest subscribes to routing statistics channel if
|
|
35
|
+
* opened by xray-core.
|
|
36
|
+
* * FieldSelectors selects a subset of fields in routing statistics to return.
|
|
37
|
+
* Valid selectors:
|
|
38
|
+
* - inbound: Selects connection's inbound tag.
|
|
39
|
+
* - network: Selects connection's network.
|
|
40
|
+
* - ip: Equivalent as "ip_source" and "ip_target", selects both source and
|
|
41
|
+
* target IP.
|
|
42
|
+
* - port: Equivalent as "port_source" and "port_target", selects both source
|
|
43
|
+
* and target port.
|
|
44
|
+
* - domain: Selects target domain.
|
|
45
|
+
* - protocol: Select connection's protocol.
|
|
46
|
+
* - user: Select connection's inbound user email.
|
|
47
|
+
* - attributes: Select connection's additional attributes.
|
|
48
|
+
* - outbound: Equivalent as "outbound" and "outbound_group", select both
|
|
49
|
+
* outbound tag and outbound group tags.
|
|
50
|
+
* * If FieldSelectors is left empty, all fields will be returned.
|
|
51
|
+
*/
|
|
52
|
+
export interface SubscribeRoutingStatsRequest {
|
|
53
|
+
$type: "xray.app.router.command.SubscribeRoutingStatsRequest";
|
|
54
|
+
FieldSelectors: string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* TestRouteRequest manually tests a routing result according to the routing
|
|
58
|
+
* context message.
|
|
59
|
+
* * RoutingContext is the routing message without outbound information.
|
|
60
|
+
* * FieldSelectors selects the fields to return in the routing result. All
|
|
61
|
+
* fields are returned if left empty.
|
|
62
|
+
* * PublishResult broadcasts the routing result to routing statistics channel
|
|
63
|
+
* if set true.
|
|
64
|
+
*/
|
|
65
|
+
export interface TestRouteRequest {
|
|
66
|
+
$type: "xray.app.router.command.TestRouteRequest";
|
|
67
|
+
RoutingContext: RoutingContext | undefined;
|
|
68
|
+
FieldSelectors: string[];
|
|
69
|
+
PublishResult: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface PrincipleTargetInfo {
|
|
72
|
+
$type: "xray.app.router.command.PrincipleTargetInfo";
|
|
73
|
+
tag: string[];
|
|
74
|
+
}
|
|
75
|
+
export interface OverrideInfo {
|
|
76
|
+
$type: "xray.app.router.command.OverrideInfo";
|
|
77
|
+
target: string;
|
|
78
|
+
}
|
|
79
|
+
export interface BalancerMsg {
|
|
80
|
+
$type: "xray.app.router.command.BalancerMsg";
|
|
81
|
+
override: OverrideInfo | undefined;
|
|
82
|
+
principleTarget: PrincipleTargetInfo | undefined;
|
|
83
|
+
}
|
|
84
|
+
export interface GetBalancerInfoRequest {
|
|
85
|
+
$type: "xray.app.router.command.GetBalancerInfoRequest";
|
|
86
|
+
tag: string;
|
|
87
|
+
}
|
|
88
|
+
export interface GetBalancerInfoResponse {
|
|
89
|
+
$type: "xray.app.router.command.GetBalancerInfoResponse";
|
|
90
|
+
balancer: BalancerMsg | undefined;
|
|
91
|
+
}
|
|
92
|
+
export interface OverrideBalancerTargetRequest {
|
|
93
|
+
$type: "xray.app.router.command.OverrideBalancerTargetRequest";
|
|
94
|
+
balancerTag: string;
|
|
95
|
+
target: string;
|
|
96
|
+
}
|
|
97
|
+
export interface OverrideBalancerTargetResponse {
|
|
98
|
+
$type: "xray.app.router.command.OverrideBalancerTargetResponse";
|
|
99
|
+
}
|
|
100
|
+
export interface AddRuleRequest {
|
|
101
|
+
$type: "xray.app.router.command.AddRuleRequest";
|
|
102
|
+
config: TypedMessage | undefined;
|
|
103
|
+
shouldAppend: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface AddRuleResponse {
|
|
106
|
+
$type: "xray.app.router.command.AddRuleResponse";
|
|
107
|
+
}
|
|
108
|
+
export interface RemoveRuleRequest {
|
|
109
|
+
$type: "xray.app.router.command.RemoveRuleRequest";
|
|
110
|
+
ruleTag: string;
|
|
111
|
+
}
|
|
112
|
+
export interface RemoveRuleResponse {
|
|
113
|
+
$type: "xray.app.router.command.RemoveRuleResponse";
|
|
114
|
+
}
|
|
115
|
+
export interface Config {
|
|
116
|
+
$type: "xray.app.router.command.Config";
|
|
117
|
+
}
|
|
118
|
+
export declare const RoutingContext: MessageFns<RoutingContext, "xray.app.router.command.RoutingContext">;
|
|
119
|
+
export declare const RoutingContext_AttributesEntry: MessageFns<RoutingContext_AttributesEntry, "xray.app.router.command.RoutingContext.AttributesEntry">;
|
|
120
|
+
export declare const SubscribeRoutingStatsRequest: MessageFns<SubscribeRoutingStatsRequest, "xray.app.router.command.SubscribeRoutingStatsRequest">;
|
|
121
|
+
export declare const TestRouteRequest: MessageFns<TestRouteRequest, "xray.app.router.command.TestRouteRequest">;
|
|
122
|
+
export declare const PrincipleTargetInfo: MessageFns<PrincipleTargetInfo, "xray.app.router.command.PrincipleTargetInfo">;
|
|
123
|
+
export declare const OverrideInfo: MessageFns<OverrideInfo, "xray.app.router.command.OverrideInfo">;
|
|
124
|
+
export declare const BalancerMsg: MessageFns<BalancerMsg, "xray.app.router.command.BalancerMsg">;
|
|
125
|
+
export declare const GetBalancerInfoRequest: MessageFns<GetBalancerInfoRequest, "xray.app.router.command.GetBalancerInfoRequest">;
|
|
126
|
+
export declare const GetBalancerInfoResponse: MessageFns<GetBalancerInfoResponse, "xray.app.router.command.GetBalancerInfoResponse">;
|
|
127
|
+
export declare const OverrideBalancerTargetRequest: MessageFns<OverrideBalancerTargetRequest, "xray.app.router.command.OverrideBalancerTargetRequest">;
|
|
128
|
+
export declare const OverrideBalancerTargetResponse: MessageFns<OverrideBalancerTargetResponse, "xray.app.router.command.OverrideBalancerTargetResponse">;
|
|
129
|
+
export declare const AddRuleRequest: MessageFns<AddRuleRequest, "xray.app.router.command.AddRuleRequest">;
|
|
130
|
+
export declare const AddRuleResponse: MessageFns<AddRuleResponse, "xray.app.router.command.AddRuleResponse">;
|
|
131
|
+
export declare const RemoveRuleRequest: MessageFns<RemoveRuleRequest, "xray.app.router.command.RemoveRuleRequest">;
|
|
132
|
+
export declare const RemoveRuleResponse: MessageFns<RemoveRuleResponse, "xray.app.router.command.RemoveRuleResponse">;
|
|
133
|
+
export declare const Config: MessageFns<Config, "xray.app.router.command.Config">;
|
|
134
|
+
export type RoutingServiceDefinition = typeof RoutingServiceDefinition;
|
|
135
|
+
export declare const RoutingServiceDefinition: {
|
|
136
|
+
readonly name: "RoutingService";
|
|
137
|
+
readonly fullName: "xray.app.router.command.RoutingService";
|
|
138
|
+
readonly methods: {
|
|
139
|
+
readonly subscribeRoutingStats: {
|
|
140
|
+
readonly name: "SubscribeRoutingStats";
|
|
141
|
+
readonly requestType: MessageFns<SubscribeRoutingStatsRequest, "xray.app.router.command.SubscribeRoutingStatsRequest">;
|
|
142
|
+
readonly requestStream: false;
|
|
143
|
+
readonly responseType: MessageFns<RoutingContext, "xray.app.router.command.RoutingContext">;
|
|
144
|
+
readonly responseStream: true;
|
|
145
|
+
readonly options: {};
|
|
146
|
+
};
|
|
147
|
+
readonly testRoute: {
|
|
148
|
+
readonly name: "TestRoute";
|
|
149
|
+
readonly requestType: MessageFns<TestRouteRequest, "xray.app.router.command.TestRouteRequest">;
|
|
150
|
+
readonly requestStream: false;
|
|
151
|
+
readonly responseType: MessageFns<RoutingContext, "xray.app.router.command.RoutingContext">;
|
|
152
|
+
readonly responseStream: false;
|
|
153
|
+
readonly options: {};
|
|
154
|
+
};
|
|
155
|
+
readonly getBalancerInfo: {
|
|
156
|
+
readonly name: "GetBalancerInfo";
|
|
157
|
+
readonly requestType: MessageFns<GetBalancerInfoRequest, "xray.app.router.command.GetBalancerInfoRequest">;
|
|
158
|
+
readonly requestStream: false;
|
|
159
|
+
readonly responseType: MessageFns<GetBalancerInfoResponse, "xray.app.router.command.GetBalancerInfoResponse">;
|
|
160
|
+
readonly responseStream: false;
|
|
161
|
+
readonly options: {};
|
|
162
|
+
};
|
|
163
|
+
readonly overrideBalancerTarget: {
|
|
164
|
+
readonly name: "OverrideBalancerTarget";
|
|
165
|
+
readonly requestType: MessageFns<OverrideBalancerTargetRequest, "xray.app.router.command.OverrideBalancerTargetRequest">;
|
|
166
|
+
readonly requestStream: false;
|
|
167
|
+
readonly responseType: MessageFns<OverrideBalancerTargetResponse, "xray.app.router.command.OverrideBalancerTargetResponse">;
|
|
168
|
+
readonly responseStream: false;
|
|
169
|
+
readonly options: {};
|
|
170
|
+
};
|
|
171
|
+
readonly addRule: {
|
|
172
|
+
readonly name: "AddRule";
|
|
173
|
+
readonly requestType: MessageFns<AddRuleRequest, "xray.app.router.command.AddRuleRequest">;
|
|
174
|
+
readonly requestStream: false;
|
|
175
|
+
readonly responseType: MessageFns<AddRuleResponse, "xray.app.router.command.AddRuleResponse">;
|
|
176
|
+
readonly responseStream: false;
|
|
177
|
+
readonly options: {};
|
|
178
|
+
};
|
|
179
|
+
readonly removeRule: {
|
|
180
|
+
readonly name: "RemoveRule";
|
|
181
|
+
readonly requestType: MessageFns<RemoveRuleRequest, "xray.app.router.command.RemoveRuleRequest">;
|
|
182
|
+
readonly requestStream: false;
|
|
183
|
+
readonly responseType: MessageFns<RemoveRuleResponse, "xray.app.router.command.RemoveRuleResponse">;
|
|
184
|
+
readonly responseStream: false;
|
|
185
|
+
readonly options: {};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
export interface RoutingServiceImplementation<CallContextExt = {}> {
|
|
190
|
+
subscribeRoutingStats(request: SubscribeRoutingStatsRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<RoutingContext>>;
|
|
191
|
+
testRoute(request: TestRouteRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RoutingContext>>;
|
|
192
|
+
getBalancerInfo(request: GetBalancerInfoRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetBalancerInfoResponse>>;
|
|
193
|
+
overrideBalancerTarget(request: OverrideBalancerTargetRequest, context: CallContext & CallContextExt): Promise<DeepPartial<OverrideBalancerTargetResponse>>;
|
|
194
|
+
addRule(request: AddRuleRequest, context: CallContext & CallContextExt): Promise<DeepPartial<AddRuleResponse>>;
|
|
195
|
+
removeRule(request: RemoveRuleRequest, context: CallContext & CallContextExt): Promise<DeepPartial<RemoveRuleResponse>>;
|
|
196
|
+
}
|
|
197
|
+
export interface RoutingServiceClient<CallOptionsExt = {}> {
|
|
198
|
+
subscribeRoutingStats(request: DeepPartial<SubscribeRoutingStatsRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<RoutingContext>;
|
|
199
|
+
testRoute(request: DeepPartial<TestRouteRequest>, options?: CallOptions & CallOptionsExt): Promise<RoutingContext>;
|
|
200
|
+
getBalancerInfo(request: DeepPartial<GetBalancerInfoRequest>, options?: CallOptions & CallOptionsExt): Promise<GetBalancerInfoResponse>;
|
|
201
|
+
overrideBalancerTarget(request: DeepPartial<OverrideBalancerTargetRequest>, options?: CallOptions & CallOptionsExt): Promise<OverrideBalancerTargetResponse>;
|
|
202
|
+
addRule(request: DeepPartial<AddRuleRequest>, options?: CallOptions & CallOptionsExt): Promise<AddRuleResponse>;
|
|
203
|
+
removeRule(request: DeepPartial<RemoveRuleRequest>, options?: CallOptions & CallOptionsExt): Promise<RemoveRuleResponse>;
|
|
204
|
+
}
|
|
205
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
206
|
+
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 {} ? {
|
|
207
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
208
|
+
} : Partial<T>;
|
|
209
|
+
export type ServerStreamingMethodResult<Response> = {
|
|
210
|
+
[Symbol.asyncIterator](): AsyncIterator<Response, void>;
|
|
211
|
+
};
|
|
212
|
+
export interface MessageFns<T, V extends string> {
|
|
213
|
+
readonly $type: V;
|
|
214
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
215
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
216
|
+
fromJSON(object: any): T;
|
|
217
|
+
toJSON(message: T): unknown;
|
|
218
|
+
create(base?: DeepPartial<T>): T;
|
|
219
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
220
|
+
}
|
|
221
|
+
export {};
|
|
222
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../../src/xray-protos/app/router/command/command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAkC,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAGpE,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,wCAAwC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACtC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,wDAAwD,CAAC;IAChE,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,sDAAsD,CAAC;IAC9D,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,0CA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