xray-typed 1.2.0 → 1.2.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.
@@ -1,15 +1,15 @@
1
- import { LogConfig } from './config/log';
2
- import { APIConfig } from './config/api';
3
- import { MetricsConfig } from './config/metrics';
4
- import { StatsConfig } from './config/stats';
5
- import { DNSConfig } from './config/dns';
6
- import { RoutingConfig } from './config/routing';
7
- import { PolicyConfig } from './config/policy';
8
- import { ReverseConfig } from './config/reverse';
9
- import { FakeDNSConfig } from './config/fakedns';
10
- import { ObservatoryConfig, BurstObservatoryConfig } from './config/observatory';
11
- import { InboundConfig } from './config/inbound';
12
- import { OutboundConfig } from './config/outbound';
1
+ import { LogConfig } from "./config/log";
2
+ import { APIConfig } from "./config/api";
3
+ import { MetricsConfig } from "./config/metrics";
4
+ import { StatsConfig } from "./config/stats";
5
+ import { DNSConfig } from "./config/dns";
6
+ import { RoutingConfig } from "./config/routing";
7
+ import { PolicyConfig } from "./config/policy";
8
+ import { ReverseConfig } from "./config/reverse";
9
+ import { FakeDNSConfig } from "./config/fakedns";
10
+ import { ObservatoryConfig, BurstObservatoryConfig } from "./config/observatory";
11
+ import { InboundConfig } from "./config/inbound";
12
+ import { OutboundConfig } from "./config/outbound";
13
13
  /**
14
14
  * Root Xray-Core configuration object.
15
15
  * This is the top-level interface representing the complete xray JSON config file.
@@ -28,6 +28,8 @@ import { OutboundConfig } from './config/outbound';
28
28
  * ```
29
29
  */
30
30
  export interface XrayConfig {
31
+ /** Remnawave Custom Field, snippet configuration for rule matching. */
32
+ snippets?: string[];
31
33
  /** Version configuration. */
32
34
  version?: VersionConfig;
33
35
  /** Log configuration. */
@@ -58,8 +60,22 @@ export interface XrayConfig {
58
60
  metrics?: MetricsConfig;
59
61
  /** Statistics module (presence enables stats). */
60
62
  stats?: StatsConfig;
61
- /** Remnawave Custom Field, snippet configuration for rule matching. */
62
- snippets?: string[];
63
+ /** Remnawave Custom */
64
+ integrations?: RemnawaveIntegrations;
65
+ }
66
+ interface NodeMetadata {
67
+ uuid: string;
68
+ name: string;
69
+ country: string;
70
+ }
71
+ interface IntegrationCert {
72
+ name: string;
73
+ cert: string | string[];
74
+ key: string | string[];
75
+ }
76
+ interface RemnawaveIntegrations {
77
+ certs?: IntegrationCert[];
78
+ nodeMetadata?: NodeMetadata;
63
79
  }
64
80
  /**
65
81
  * Version constraint configuration.
@@ -79,7 +95,7 @@ export interface VersionConfig {
79
95
  * All top-level keys of XrayConfig in canonical order.
80
96
  * Use with `sortXrayConfig` or for your own normalization logic.
81
97
  */
82
- export declare const XRAY_CONFIG_KEY_ORDER: readonly ["version", "log", "dns", "inbounds", "outbounds", "routing", "policy", "transport", "stats", "reverse", "fakeDns", "observatory", "burstObservatory", "api", "metrics"];
98
+ export declare const XRAY_CONFIG_KEY_ORDER: readonly ["snippets", "version", "log", "dns", "inbounds", "outbounds", "routing", "policy", "transport", "stats", "reverse", "fakeDns", "observatory", "burstObservatory", "api", "metrics"];
83
99
  /** Union of all top-level XrayConfig key names. */
84
100
  export type XrayConfigKey = (typeof XRAY_CONFIG_KEY_ORDER)[number];
85
101
  /**
@@ -96,4 +112,5 @@ export type XrayConfigKey = (typeof XRAY_CONFIG_KEY_ORDER)[number];
96
112
  * ```
97
113
  */
98
114
  export declare function sortXrayConfig<T extends XrayConfig>(config: T): T;
115
+ export {};
99
116
  //# sourceMappingURL=xray-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xray-config.d.ts","sourceRoot":"","sources":["../src/xray-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAA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AC,EAAE,eAAe,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AACD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,6FAA6F;IAC7F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,+LAiBgB,CAAC;AAEnD,mDAAmD;AACnD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAgBjE"}
@@ -7,21 +7,22 @@ exports.sortXrayConfig = sortXrayConfig;
7
7
  * Use with `sortXrayConfig` or for your own normalization logic.
8
8
  */
9
9
  exports.XRAY_CONFIG_KEY_ORDER = [
10
- 'version',
11
- 'log',
12
- 'dns',
13
- 'inbounds',
14
- 'outbounds',
15
- 'routing',
16
- 'policy',
17
- 'transport',
18
- 'stats',
19
- 'reverse',
20
- 'fakeDns',
21
- 'observatory',
22
- 'burstObservatory',
23
- 'api',
24
- 'metrics',
10
+ "snippets",
11
+ "version",
12
+ "log",
13
+ "dns",
14
+ "inbounds",
15
+ "outbounds",
16
+ "routing",
17
+ "policy",
18
+ "transport",
19
+ "stats",
20
+ "reverse",
21
+ "fakeDns",
22
+ "observatory",
23
+ "burstObservatory",
24
+ "api",
25
+ "metrics",
25
26
  ];
26
27
  /**
27
28
  * Returns a new XrayConfig with keys sorted in canonical order.
@@ -1 +1 @@
1
- {"version":3,"file":"xray-config.js","sourceRoot":"","sources":["../src/xray-config.ts"],"names":[],"mappings":";;;AAsHA,wCAgBC;AAtDD;;;GAGG;AACU,QAAA,qBAAqB,GAAG;IACjC,SAAS;IACT,KAAK;IACL,KAAK;IACL,UAAU;IACV,WAAW;IAC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AC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,IAAI,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,EAAE,CAAC;YACrB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAc,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IAED,OAAO,MAAW,CAAC;AACrB,CAAC"}
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "xray-typed",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Complete TypeScript type definitions for Xray-Core JSON configuration",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "keywords": [
6
+ "proxy",
7
+ "shadowsocks",
8
+ "trojan",
9
+ "types",
10
+ "typescript",
11
+ "vless",
12
+ "vmess",
13
+ "xray",
14
+ "xray-core",
15
+ "xtls"
16
+ ],
17
+ "license": "MIT",
7
18
  "files": [
8
19
  "dist"
9
20
  ],
21
+ "main": "dist/index.js",
22
+ "types": "dist/index.d.ts",
10
23
  "scripts": {
11
24
  "prepublish": "rm -rf build && tsc",
12
25
  "build": "tsc"
13
26
  },
14
- "keywords": [
15
- "xray",
16
- "xray-core",
17
- "xtls",
18
- "vless",
19
- "vmess",
20
- "trojan",
21
- "shadowsocks",
22
- "proxy",
23
- "typescript",
24
- "types"
25
- ],
26
- "license": "MIT",
27
27
  "devDependencies": {
28
28
  "typescript": "^5.9.3"
29
29
  }