@remnawave/xtls-sdk 0.1.2 → 0.1.4

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.
@@ -3,6 +3,6 @@ export interface IAddSourceIpRule {
3
3
  ip: string;
4
4
  outbound: string;
5
5
  append: boolean;
6
- inbound?: string;
6
+ inboundTag?: string;
7
7
  }
8
8
  //# sourceMappingURL=add-source-ip-rule.interface.d.ts.map
@@ -1 +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"}
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,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -22,8 +22,8 @@ export declare class RouterService {
22
22
  * @param dto.outbound - Outbound tag to route matched traffic
23
23
  * @param dto.ip - Source IP address to match
24
24
  * @param dto.append - Whether to append the rule or replace existing rules
25
- * @param dto.inbound - Optional inbound tag to match
26
25
  * @returns Promise resolving to response indicating success or failure
26
+ * @param dto.inboundTag - Optional inbound tag to match
27
27
  */
28
28
  addSrcIpRule(dto: IAddSourceIpRule): Promise<ISdkResponse<AddSourceIpRuleResponseModel>>;
29
29
  /**
@@ -31,8 +31,8 @@ class RouterService {
31
31
  * @param dto.outbound - Outbound tag to route matched traffic
32
32
  * @param dto.ip - Source IP address to match
33
33
  * @param dto.append - Whether to append the rule or replace existing rules
34
- * @param dto.inbound - Optional inbound tag to match
35
34
  * @returns Promise resolving to response indicating success or failure
35
+ * @param dto.inboundTag - Optional inbound tag to match
36
36
  */
37
37
  async addSrcIpRule(dto) {
38
38
  try {
@@ -40,7 +40,7 @@ class RouterService {
40
40
  ruleTag: dto.ruleTag,
41
41
  outboundTag: dto.outbound,
42
42
  source: [dto.ip],
43
- inboundTag: dto.inbound ? [dto.inbound] : [''],
43
+ inboundTag: dto.inboundTag ? [dto.inboundTag] : [],
44
44
  type: 'field',
45
45
  };
46
46
  await this.client.addRule({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/xtls-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "A Typescript SDK for XRAY (XTLS) Core GRPC Api",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",