xray-typed 1.0.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.
- package/README.md +0 -0
- package/dist/config/api.d.ts +15 -0
- package/dist/config/api.d.ts.map +1 -0
- package/dist/config/api.js +3 -0
- package/dist/config/api.js.map +1 -0
- package/dist/config/dns.d.ts +65 -0
- package/dist/config/dns.d.ts.map +1 -0
- package/dist/config/dns.js +3 -0
- package/dist/config/dns.js.map +1 -0
- package/dist/config/fakedns.d.ts +13 -0
- package/dist/config/fakedns.d.ts.map +1 -0
- package/dist/config/fakedns.js +3 -0
- package/dist/config/fakedns.js.map +1 -0
- package/dist/config/inbound.d.ts +36 -0
- package/dist/config/inbound.d.ts.map +1 -0
- package/dist/config/inbound.js +3 -0
- package/dist/config/inbound.js.map +1 -0
- package/dist/config/index.d.ts +15 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +31 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/log.d.ts +20 -0
- package/dist/config/log.d.ts.map +1 -0
- package/dist/config/log.js +3 -0
- package/dist/config/log.js.map +1 -0
- package/dist/config/metrics.d.ts +12 -0
- package/dist/config/metrics.d.ts.map +1 -0
- package/dist/config/metrics.js +3 -0
- package/dist/config/metrics.js.map +1 -0
- package/dist/config/mux.d.ts +17 -0
- package/dist/config/mux.d.ts.map +1 -0
- package/dist/config/mux.js +3 -0
- package/dist/config/mux.js.map +1 -0
- package/dist/config/observatory.d.ts +34 -0
- package/dist/config/observatory.d.ts.map +1 -0
- package/dist/config/observatory.js +3 -0
- package/dist/config/observatory.js.map +1 -0
- package/dist/config/outbound.d.ts +48 -0
- package/dist/config/outbound.d.ts.map +1 -0
- package/dist/config/outbound.js +3 -0
- package/dist/config/outbound.js.map +1 -0
- package/dist/config/policy.d.ts +40 -0
- package/dist/config/policy.d.ts.map +1 -0
- package/dist/config/policy.js +3 -0
- package/dist/config/policy.js.map +1 -0
- package/dist/config/reverse.d.ts +24 -0
- package/dist/config/reverse.d.ts.map +1 -0
- package/dist/config/reverse.js +3 -0
- package/dist/config/reverse.js.map +1 -0
- package/dist/config/routing.d.ts +84 -0
- package/dist/config/routing.d.ts.map +1 -0
- package/dist/config/routing.js +3 -0
- package/dist/config/routing.js.map +1 -0
- package/dist/config/sniffing.d.ts +19 -0
- package/dist/config/sniffing.d.ts.map +1 -0
- package/dist/config/sniffing.js +3 -0
- package/dist/config/sniffing.js.map +1 -0
- package/dist/config/stats.d.ts +9 -0
- package/dist/config/stats.d.ts.map +1 -0
- package/dist/config/stats.js +3 -0
- package/dist/config/stats.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/proxies/blackhole.d.ts +15 -0
- package/dist/proxies/blackhole.d.ts.map +1 -0
- package/dist/proxies/blackhole.js +3 -0
- package/dist/proxies/blackhole.js.map +1 -0
- package/dist/proxies/dns.d.ts +22 -0
- package/dist/proxies/dns.d.ts.map +1 -0
- package/dist/proxies/dns.js +3 -0
- package/dist/proxies/dns.js.map +1 -0
- package/dist/proxies/dokodemo.d.ts +20 -0
- package/dist/proxies/dokodemo.d.ts.map +1 -0
- package/dist/proxies/dokodemo.js +3 -0
- package/dist/proxies/dokodemo.js.map +1 -0
- package/dist/proxies/freedom.d.ts +47 -0
- package/dist/proxies/freedom.d.ts.map +1 -0
- package/dist/proxies/freedom.js +3 -0
- package/dist/proxies/freedom.js.map +1 -0
- package/dist/proxies/http.d.ts +57 -0
- package/dist/proxies/http.d.ts.map +1 -0
- package/dist/proxies/http.js +9 -0
- package/dist/proxies/http.js.map +1 -0
- package/dist/proxies/index.d.ts +13 -0
- package/dist/proxies/index.d.ts.map +1 -0
- package/dist/proxies/index.js +29 -0
- package/dist/proxies/index.js.map +1 -0
- package/dist/proxies/loopback.d.ts +11 -0
- package/dist/proxies/loopback.d.ts.map +1 -0
- package/dist/proxies/loopback.js +3 -0
- package/dist/proxies/loopback.js.map +1 -0
- package/dist/proxies/shadowsocks.d.ts +74 -0
- package/dist/proxies/shadowsocks.d.ts.map +1 -0
- package/dist/proxies/shadowsocks.js +9 -0
- package/dist/proxies/shadowsocks.js.map +1 -0
- package/dist/proxies/socks.d.ts +60 -0
- package/dist/proxies/socks.d.ts.map +1 -0
- package/dist/proxies/socks.js +9 -0
- package/dist/proxies/socks.js.map +1 -0
- package/dist/proxies/trojan.d.ts +67 -0
- package/dist/proxies/trojan.d.ts.map +1 -0
- package/dist/proxies/trojan.js +9 -0
- package/dist/proxies/trojan.js.map +1 -0
- package/dist/proxies/vless.d.ts +96 -0
- package/dist/proxies/vless.d.ts.map +1 -0
- package/dist/proxies/vless.js +9 -0
- package/dist/proxies/vless.js.map +1 -0
- package/dist/proxies/vmess.d.ts +68 -0
- package/dist/proxies/vmess.d.ts.map +1 -0
- package/dist/proxies/vmess.js +9 -0
- package/dist/proxies/vmess.js.map +1 -0
- package/dist/proxies/wireguard.d.ts +36 -0
- package/dist/proxies/wireguard.d.ts.map +1 -0
- package/dist/proxies/wireguard.js +3 -0
- package/dist/proxies/wireguard.js.map +1 -0
- package/dist/transport/common.d.ts +25 -0
- package/dist/transport/common.d.ts.map +1 -0
- package/dist/transport/common.js +6 -0
- package/dist/transport/common.js.map +1 -0
- package/dist/transport/finalmask.d.ts +79 -0
- package/dist/transport/finalmask.d.ts.map +1 -0
- package/dist/transport/finalmask.js +3 -0
- package/dist/transport/finalmask.js.map +1 -0
- package/dist/transport/grpc.d.ts +24 -0
- package/dist/transport/grpc.d.ts.map +1 -0
- package/dist/transport/grpc.js +3 -0
- package/dist/transport/grpc.js.map +1 -0
- package/dist/transport/http.d.ts +21 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/transport/http.js +3 -0
- package/dist/transport/http.js.map +1 -0
- package/dist/transport/httpupgrade.d.ts +16 -0
- package/dist/transport/httpupgrade.d.ts.map +1 -0
- package/dist/transport/httpupgrade.js +3 -0
- package/dist/transport/httpupgrade.js.map +1 -0
- package/dist/transport/hysteria.d.ts +45 -0
- package/dist/transport/hysteria.d.ts.map +1 -0
- package/dist/transport/hysteria.js +3 -0
- package/dist/transport/hysteria.js.map +1 -0
- package/dist/transport/index.d.ts +16 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +30 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/kcp.d.ts +31 -0
- package/dist/transport/kcp.d.ts.map +1 -0
- package/dist/transport/kcp.js +3 -0
- package/dist/transport/kcp.js.map +1 -0
- package/dist/transport/quic.d.ts +20 -0
- package/dist/transport/quic.d.ts.map +1 -0
- package/dist/transport/quic.js +3 -0
- package/dist/transport/quic.js.map +1 -0
- package/dist/transport/reality.d.ts +60 -0
- package/dist/transport/reality.d.ts.map +1 -0
- package/dist/transport/reality.js +3 -0
- package/dist/transport/reality.js.map +1 -0
- package/dist/transport/sockopt.d.ts +74 -0
- package/dist/transport/sockopt.d.ts.map +1 -0
- package/dist/transport/sockopt.js +3 -0
- package/dist/transport/sockopt.js.map +1 -0
- package/dist/transport/splithttp.d.ts +81 -0
- package/dist/transport/splithttp.d.ts.map +1 -0
- package/dist/transport/splithttp.js +3 -0
- package/dist/transport/splithttp.js.map +1 -0
- package/dist/transport/stream.d.ts +57 -0
- package/dist/transport/stream.d.ts.map +1 -0
- package/dist/transport/stream.js +3 -0
- package/dist/transport/stream.js.map +1 -0
- package/dist/transport/tcp.d.ts +42 -0
- package/dist/transport/tcp.d.ts.map +1 -0
- package/dist/transport/tcp.js +3 -0
- package/dist/transport/tcp.js.map +1 -0
- package/dist/transport/tls.d.ts +69 -0
- package/dist/transport/tls.d.ts.map +1 -0
- package/dist/transport/tls.js +3 -0
- package/dist/transport/tls.js.map +1 -0
- package/dist/transport/websocket.d.ts +18 -0
- package/dist/transport/websocket.d.ts.map +1 -0
- package/dist/transport/websocket.js +3 -0
- package/dist/transport/websocket.js.map +1 -0
- package/dist/xray-config.d.ts +76 -0
- package/dist/xray-config.d.ts.map +1 -0
- package/dist/xray-config.js +3 -0
- package/dist/xray-config.js.map +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trojan proxy protocol configuration.
|
|
3
|
+
*
|
|
4
|
+
* @see https://xtls.github.io/en/config/inbounds/trojan.html
|
|
5
|
+
* @see https://xtls.github.io/en/config/outbounds/trojan.html
|
|
6
|
+
*/
|
|
7
|
+
export interface TrojanInboundConfig {
|
|
8
|
+
/** Authorized user list. */
|
|
9
|
+
clients?: TrojanUser[];
|
|
10
|
+
/** Fallback configurations. */
|
|
11
|
+
fallbacks?: TrojanInboundFallback[];
|
|
12
|
+
}
|
|
13
|
+
export interface TrojanUser {
|
|
14
|
+
/** User password. */
|
|
15
|
+
password?: string;
|
|
16
|
+
/** User level for policy. */
|
|
17
|
+
level?: number;
|
|
18
|
+
/** User email for stats and identification. */
|
|
19
|
+
email?: string;
|
|
20
|
+
/** Flow control mode (e.g. "xtls-rprx-vision"). */
|
|
21
|
+
flow?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TrojanInboundFallback {
|
|
24
|
+
/** SNI matching (empty = default fallback). */
|
|
25
|
+
name?: string;
|
|
26
|
+
/** ALPN matching. */
|
|
27
|
+
alpn?: string;
|
|
28
|
+
/** HTTP path matching. */
|
|
29
|
+
path?: string;
|
|
30
|
+
/** Destination type. */
|
|
31
|
+
type?: string;
|
|
32
|
+
/** Fallback destination (port number, "addr:port", or Unix socket path). */
|
|
33
|
+
dest?: string | number;
|
|
34
|
+
/** PROXY protocol version to send to fallback target (0 = disabled). */
|
|
35
|
+
xver?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface TrojanOutboundConfig {
|
|
38
|
+
/** Server list. */
|
|
39
|
+
servers?: TrojanOutboundServer[];
|
|
40
|
+
/** Server address (flat format). */
|
|
41
|
+
address?: string;
|
|
42
|
+
/** Server port (flat format). */
|
|
43
|
+
port?: number;
|
|
44
|
+
/** User level (flat format). */
|
|
45
|
+
level?: number;
|
|
46
|
+
/** User email (flat format). */
|
|
47
|
+
email?: string;
|
|
48
|
+
/** Password (flat format). */
|
|
49
|
+
password?: string;
|
|
50
|
+
/** Flow control (flat format). */
|
|
51
|
+
flow?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface TrojanOutboundServer {
|
|
54
|
+
/** Server address. */
|
|
55
|
+
address?: string;
|
|
56
|
+
/** Server port. */
|
|
57
|
+
port?: number;
|
|
58
|
+
/** User level for policy. */
|
|
59
|
+
level?: number;
|
|
60
|
+
/** User email for stats. */
|
|
61
|
+
email?: string;
|
|
62
|
+
/** Authentication password. */
|
|
63
|
+
password?: string;
|
|
64
|
+
/** Flow control mode. */
|
|
65
|
+
flow?: string;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=trojan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trojan.d.ts","sourceRoot":"","sources":["../../src/proxies/trojan.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,mBAAmB;IAChC,4BAA4B;IAC5B,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,UAAU;IACvB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IAClC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,WAAW,oBAAoB;IACjC,mBAAmB;IACnB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAGjC,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Trojan proxy protocol configuration.
|
|
4
|
+
*
|
|
5
|
+
* @see https://xtls.github.io/en/config/inbounds/trojan.html
|
|
6
|
+
* @see https://xtls.github.io/en/config/outbounds/trojan.html
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=trojan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trojan.js","sourceRoot":"","sources":["../../src/proxies/trojan.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VLESS proxy protocol configuration.
|
|
3
|
+
*
|
|
4
|
+
* @see https://xtls.github.io/en/config/inbounds/vless.html
|
|
5
|
+
* @see https://xtls.github.io/en/config/outbounds/vless.html
|
|
6
|
+
*/
|
|
7
|
+
export interface VLessInboundConfig {
|
|
8
|
+
/** Authorized client list. */
|
|
9
|
+
clients?: VLessClient[];
|
|
10
|
+
/** Decryption method. Must be "none" for VLESS. */
|
|
11
|
+
decryption?: 'none';
|
|
12
|
+
/** Fallback configurations for TCP+TLS. */
|
|
13
|
+
fallbacks?: VLessInboundFallback[];
|
|
14
|
+
/** Default flow control for all clients. Overrides per-client flow if set. */
|
|
15
|
+
flow?: VLessInboundFlow;
|
|
16
|
+
/** Test seed values (internal use). */
|
|
17
|
+
testseed?: number[];
|
|
18
|
+
}
|
|
19
|
+
export interface VLessClient {
|
|
20
|
+
/** Client UUID. */
|
|
21
|
+
id?: string;
|
|
22
|
+
/** Flow control mode (e.g. "xtls-rprx-vision"). */
|
|
23
|
+
flow?: VLessFlow;
|
|
24
|
+
/** User level for policy. */
|
|
25
|
+
level?: number;
|
|
26
|
+
/** User email for stats and identification. */
|
|
27
|
+
email?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface VLessInboundFallback {
|
|
30
|
+
/** SNI matching (empty = default fallback). */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** ALPN matching (empty = default). */
|
|
33
|
+
alpn?: string;
|
|
34
|
+
/** HTTP path matching. */
|
|
35
|
+
path?: string;
|
|
36
|
+
/** Destination type. */
|
|
37
|
+
type?: string;
|
|
38
|
+
/** Fallback destination (port number, "addr:port", or Unix socket path). */
|
|
39
|
+
dest?: string | number;
|
|
40
|
+
/** PROXY protocol version to send to fallback target (0 = disabled). */
|
|
41
|
+
xver?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface VLessOutboundConfig {
|
|
44
|
+
/** Server list. */
|
|
45
|
+
vnext?: VLessOutboundServer[];
|
|
46
|
+
/** Server address (flat format). */
|
|
47
|
+
address?: string;
|
|
48
|
+
/** Server port (flat format). */
|
|
49
|
+
port?: number;
|
|
50
|
+
/** User level (flat format). */
|
|
51
|
+
level?: number;
|
|
52
|
+
/** User email (flat format). */
|
|
53
|
+
email?: string;
|
|
54
|
+
/** User UUID (flat format). */
|
|
55
|
+
id?: string;
|
|
56
|
+
/** Flow control (flat format). */
|
|
57
|
+
flow?: VLessFlow;
|
|
58
|
+
/** Encryption seed (flat format). */
|
|
59
|
+
seed?: string;
|
|
60
|
+
/** Encryption method (flat format). */
|
|
61
|
+
encryption?: string;
|
|
62
|
+
/** Reverse proxy settings. */
|
|
63
|
+
reverse?: VLessReverse;
|
|
64
|
+
/** Test pre-value (internal use). */
|
|
65
|
+
testpre?: number;
|
|
66
|
+
/** Test seed values (internal use). */
|
|
67
|
+
testseed?: number[];
|
|
68
|
+
}
|
|
69
|
+
export interface VLessOutboundServer {
|
|
70
|
+
/** Server address. */
|
|
71
|
+
address?: string;
|
|
72
|
+
/** Server port. */
|
|
73
|
+
port?: number;
|
|
74
|
+
/** User list for this server. */
|
|
75
|
+
users?: VLessOutboundUser[];
|
|
76
|
+
}
|
|
77
|
+
export interface VLessOutboundUser {
|
|
78
|
+
/** User UUID. */
|
|
79
|
+
id?: string;
|
|
80
|
+
/** Flow control mode. */
|
|
81
|
+
flow?: VLessFlow;
|
|
82
|
+
/** Encryption method (default: "none"). */
|
|
83
|
+
encryption?: string;
|
|
84
|
+
/** User level for policy. */
|
|
85
|
+
level?: number;
|
|
86
|
+
/** User email for stats. */
|
|
87
|
+
email?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface VLessReverse {
|
|
90
|
+
[key: string]: unknown;
|
|
91
|
+
}
|
|
92
|
+
/** Flow control modes available for inbound (server-side global default). */
|
|
93
|
+
export type VLessInboundFlow = '' | 'xtls-rprx-vision';
|
|
94
|
+
/** Flow control modes available for outbound and per-client settings. */
|
|
95
|
+
export type VLessFlow = '' | 'xtls-rprx-vision' | 'xtls-rprx-vision-udp443';
|
|
96
|
+
//# sourceMappingURL=vless.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vless.d.ts","sourceRoot":"","sources":["../../src/proxies/vless.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,kBAAkB;IAC/B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IACxB,mBAAmB;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACjC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,WAAW,mBAAmB;IAChC,mBAAmB;IACnB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAG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S,GAAG,EAAE,GAAG,kBAAkB,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* VLESS proxy protocol configuration.
|
|
4
|
+
*
|
|
5
|
+
* @see https://xtls.github.io/en/config/inbounds/vless.html
|
|
6
|
+
* @see https://xtls.github.io/en/config/outbounds/vless.html
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=vless.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vless.js","sourceRoot":"","sources":["../../src/proxies/vless.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VMess proxy protocol configuration.
|
|
3
|
+
*
|
|
4
|
+
* @see https://xtls.github.io/en/config/inbounds/vmess.html
|
|
5
|
+
* @see https://xtls.github.io/en/config/outbounds/vmess.html
|
|
6
|
+
*/
|
|
7
|
+
export interface VMessInboundConfig {
|
|
8
|
+
/** Authorized client list. */
|
|
9
|
+
clients?: VMessInboundUser[];
|
|
10
|
+
/** Default settings for clients. */
|
|
11
|
+
default?: VMessDefaultConfig;
|
|
12
|
+
}
|
|
13
|
+
export interface VMessInboundUser {
|
|
14
|
+
/** Client UUID. */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** Security encryption method. */
|
|
17
|
+
security?: VMessSecurity;
|
|
18
|
+
/** Experiments to enable (e.g. "AuthenticatedLength", "NoTerminationSignal"). */
|
|
19
|
+
experiments?: string;
|
|
20
|
+
/** User level for policy. */
|
|
21
|
+
level?: number;
|
|
22
|
+
/** User email for stats and identification. */
|
|
23
|
+
email?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface VMessDefaultConfig {
|
|
26
|
+
/** Default user level. */
|
|
27
|
+
level?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface VMessOutboundConfig {
|
|
30
|
+
/** Server list. */
|
|
31
|
+
vnext?: VMessOutboundServer[];
|
|
32
|
+
/** Server address (flat format). */
|
|
33
|
+
address?: string;
|
|
34
|
+
/** Server port (flat format). */
|
|
35
|
+
port?: number;
|
|
36
|
+
/** User level (flat format). */
|
|
37
|
+
level?: number;
|
|
38
|
+
/** User email (flat format). */
|
|
39
|
+
email?: string;
|
|
40
|
+
/** User UUID (flat format). */
|
|
41
|
+
id?: string;
|
|
42
|
+
/** Security method (flat format). */
|
|
43
|
+
security?: VMessSecurity;
|
|
44
|
+
/** Experiments (flat format). */
|
|
45
|
+
experiments?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface VMessOutboundServer {
|
|
48
|
+
/** Server address. */
|
|
49
|
+
address?: string;
|
|
50
|
+
/** Server port. */
|
|
51
|
+
port?: number;
|
|
52
|
+
/** User list for this server. */
|
|
53
|
+
users?: VMessOutboundUser[];
|
|
54
|
+
}
|
|
55
|
+
export interface VMessOutboundUser {
|
|
56
|
+
/** User UUID. */
|
|
57
|
+
id?: string;
|
|
58
|
+
/** Security encryption method (default: "auto"). */
|
|
59
|
+
security?: VMessSecurity;
|
|
60
|
+
/** User level for policy. */
|
|
61
|
+
level?: number;
|
|
62
|
+
/** User email for stats. */
|
|
63
|
+
email?: string;
|
|
64
|
+
/** Experiments to enable. */
|
|
65
|
+
experiments?: string;
|
|
66
|
+
}
|
|
67
|
+
export type VMessSecurity = 'auto' | 'aes-128-gcm' | 'chacha20-poly1305' | 'none' | 'zero';
|
|
68
|
+
//# sourceMappingURL=vmess.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vmess.d.ts","sourceRoot":"","sources":["../../src/proxies/vmess.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,kBAAkB;IAC/B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,oCAAoC;IACpC,OAAO,CAAC,EAAE,kBAAkB,C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AAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,aAAa,GACnB,MAAM,GACN,aAAa,GACb,mBAAmB,GACnB,MAAM,GACN,MAAM,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* VMess proxy protocol configuration.
|
|
4
|
+
*
|
|
5
|
+
* @see https://xtls.github.io/en/config/inbounds/vmess.html
|
|
6
|
+
* @see https://xtls.github.io/en/config/outbounds/vmess.html
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=vmess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vmess.js","sourceRoot":"","sources":["../../src/proxies/vmess.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WireGuard outbound proxy configuration.
|
|
3
|
+
*
|
|
4
|
+
* @see https://xtls.github.io/en/config/outbounds/wireguard.html
|
|
5
|
+
*/
|
|
6
|
+
export interface WireGuardOutboundConfig {
|
|
7
|
+
/** Disable kernel TUN (use userspace). */
|
|
8
|
+
noKernelTun?: boolean;
|
|
9
|
+
/** WireGuard private key (base64). */
|
|
10
|
+
secretKey?: string;
|
|
11
|
+
/** Local IP addresses with CIDR (e.g. ["10.0.0.2/32", "fd00::2/128"]). */
|
|
12
|
+
address?: string[];
|
|
13
|
+
/** Peer configurations. */
|
|
14
|
+
peers?: WireGuardPeer[];
|
|
15
|
+
/** MTU for the WireGuard interface (default: 1420). */
|
|
16
|
+
mtu?: number;
|
|
17
|
+
/** Number of worker threads. */
|
|
18
|
+
workers?: number;
|
|
19
|
+
/** Reserved bytes for WireGuard header (3 bytes as array). */
|
|
20
|
+
reserved?: number[];
|
|
21
|
+
/** Domain resolution strategy. */
|
|
22
|
+
domainStrategy?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface WireGuardPeer {
|
|
25
|
+
/** Peer's public key (base64). */
|
|
26
|
+
publicKey?: string;
|
|
27
|
+
/** Pre-shared key for additional security (base64). */
|
|
28
|
+
preSharedKey?: string;
|
|
29
|
+
/** Peer endpoint (e.g. "engage.cloudflareclient.com:2408"). */
|
|
30
|
+
endpoint?: string;
|
|
31
|
+
/** Keep-alive interval in seconds (default: 0 = disabled). */
|
|
32
|
+
keepAlive?: number;
|
|
33
|
+
/** Allowed IP ranges (default: ["0.0.0.0/0", "::/0"]). */
|
|
34
|
+
allowedIPs?: string[];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=wireguard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireguard.d.ts","sourceRoot":"","sources":["../../src/proxies/wireguard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACpC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC1B,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireguard.js","sourceRoot":"","sources":["../../src/proxies/wireguard.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common transport types used across Xray-Core transport configurations.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Range value that can be expressed as "from-to" string or a single number.
|
|
6
|
+
* Used in SplitHTTP/XHTTP and other configs for randomized ranges.
|
|
7
|
+
*/
|
|
8
|
+
export type Int32Range = string | number;
|
|
9
|
+
/**
|
|
10
|
+
* Bandwidth specification (e.g. "100 mbps", "1 gbps").
|
|
11
|
+
*/
|
|
12
|
+
export type Bandwidth = string | number;
|
|
13
|
+
/**
|
|
14
|
+
* Transport protocol type.
|
|
15
|
+
*/
|
|
16
|
+
export type TransportProtocol = 'tcp' | 'raw' | 'kcp' | 'mkcp' | 'ws' | 'websocket' | 'http' | 'h2' | 'grpc' | 'gun' | 'quic' | 'httpupgrade' | 'splithttp' | 'xhttp' | 'hysteria2';
|
|
17
|
+
/**
|
|
18
|
+
* Security type for stream settings.
|
|
19
|
+
*/
|
|
20
|
+
export type SecurityType = 'none' | 'tls' | 'reality';
|
|
21
|
+
/**
|
|
22
|
+
* Header type for obfuscation (TCP/mKCP/QUIC).
|
|
23
|
+
*/
|
|
24
|
+
export type HeaderType = 'none' | 'srtp' | 'utp' | 'wechat-video' | 'dtls' | 'wireguard' | 'dns';
|
|
25
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/transport/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACvB,KAAK,GACL,KAAK,GACL,KAAK,GACL,MAAM,GACN,IAAI,GACJ,WAAW,GACX,MAAM,GACN,IAAI,GACJ,MAAM,GACN,KAAK,GACL,MAAM,GACN,aAAa,GACb,WAAW,GACX,OAAO,GACP,WAAW,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,UAAU,GAChB,MAAM,GACN,MAAM,GACN,KAAK,GACL,cAAc,GACd,MAAM,GACN,WAAW,GACX,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/transport/common.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Bandwidth, Int32Range } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* FinalMask configuration for advanced QUIC/UDP masking.
|
|
4
|
+
*/
|
|
5
|
+
export interface FinalMaskConfig {
|
|
6
|
+
/** TCP mask rules. */
|
|
7
|
+
tcp?: MaskRule[];
|
|
8
|
+
/** UDP mask rules. */
|
|
9
|
+
udp?: MaskRule[];
|
|
10
|
+
/** QUIC parameters. */
|
|
11
|
+
quicParams?: QuicParamsConfig;
|
|
12
|
+
}
|
|
13
|
+
export interface MaskRule {
|
|
14
|
+
/** Mask type (e.g. "fragment", "noise", "custom"). */
|
|
15
|
+
type?: string;
|
|
16
|
+
/** Mask-specific settings. */
|
|
17
|
+
settings?: FragmentMaskSettings | NoiseMaskSettings | Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface FragmentMaskSettings {
|
|
20
|
+
/** Which packets to fragment (e.g. "tlshello", "1-3"). */
|
|
21
|
+
packets?: string;
|
|
22
|
+
/** Fragment length range. */
|
|
23
|
+
length?: Int32Range;
|
|
24
|
+
/** Delay range between fragments in ms. */
|
|
25
|
+
delay?: Int32Range;
|
|
26
|
+
/** Maximum number of splits. */
|
|
27
|
+
maxSplit?: Int32Range;
|
|
28
|
+
}
|
|
29
|
+
export interface NoiseMaskSettings {
|
|
30
|
+
/** Reset interval range. */
|
|
31
|
+
reset?: Int32Range;
|
|
32
|
+
/** Noise items. */
|
|
33
|
+
noise?: NoiseItem[];
|
|
34
|
+
}
|
|
35
|
+
export interface NoiseItem {
|
|
36
|
+
/** Random padding size range. */
|
|
37
|
+
rand?: Int32Range;
|
|
38
|
+
/** Noise packet type (e.g. "rand", "str", "base64"). */
|
|
39
|
+
type?: string;
|
|
40
|
+
/** Noise packet content. */
|
|
41
|
+
packet?: string;
|
|
42
|
+
/** Delay range in ms before sending. */
|
|
43
|
+
delay?: Int32Range;
|
|
44
|
+
}
|
|
45
|
+
export interface QuicParamsConfig {
|
|
46
|
+
/** Congestion control algorithm (e.g. "bbr", "brutal", "cubic"). */
|
|
47
|
+
congestion?: string;
|
|
48
|
+
/** Enable QUIC debug logging. */
|
|
49
|
+
debug?: boolean;
|
|
50
|
+
/** Brutal congestion control upload bandwidth. */
|
|
51
|
+
brutalUp?: Bandwidth;
|
|
52
|
+
/** Brutal congestion control download bandwidth. */
|
|
53
|
+
brutalDown?: Bandwidth;
|
|
54
|
+
/** UDP port hopping configuration. */
|
|
55
|
+
udpHop?: UdpHopConfig;
|
|
56
|
+
/** Initial per-stream receive window size. */
|
|
57
|
+
initStreamReceiveWindow?: number;
|
|
58
|
+
/** Maximum per-stream receive window size. */
|
|
59
|
+
maxStreamReceiveWindow?: number;
|
|
60
|
+
/** Initial per-connection receive window size. */
|
|
61
|
+
initConnectionReceiveWindow?: number;
|
|
62
|
+
/** Maximum per-connection receive window size. */
|
|
63
|
+
maxConnectionReceiveWindow?: number;
|
|
64
|
+
/** Maximum idle timeout in seconds. */
|
|
65
|
+
maxIdleTimeout?: number;
|
|
66
|
+
/** Keep-alive period in seconds. */
|
|
67
|
+
keepAlivePeriod?: number;
|
|
68
|
+
/** Disable Path MTU Discovery. */
|
|
69
|
+
disablePathMTUDiscovery?: boolean;
|
|
70
|
+
/** Maximum number of incoming streams. */
|
|
71
|
+
maxIncomingStreams?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface UdpHopConfig {
|
|
74
|
+
/** Port list or range (e.g. "20000-40000"). */
|
|
75
|
+
ports?: string;
|
|
76
|
+
/** Hop interval range in ms. */
|
|
77
|
+
interval?: Int32Range;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=finalmask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalmask.d.ts","sourceRoot":"","sources":["../../src/transport/finalmask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,sBAAsB;IACtB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjB,sBAAsB;IACtB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjB,uBAAuB;IACvB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,WAAW,QAAQ;IACrB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,oBAAoB,GAAG,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjF;AAED,MAAM,WAAW,oBAAoB;IACjC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,iBAA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version":3,"file":"finalmask.js","sourceRoot":"","sources":["../../src/transport/finalmask.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gRPC transport configuration.
|
|
3
|
+
*
|
|
4
|
+
* @see https://xtls.github.io/en/config/transports/grpc.html
|
|
5
|
+
*/
|
|
6
|
+
export interface GRPCConfig {
|
|
7
|
+
/** Authority header for gRPC. */
|
|
8
|
+
authority?: string;
|
|
9
|
+
/** gRPC service name (maps to URL path). */
|
|
10
|
+
serviceName?: string;
|
|
11
|
+
/** Enable multi-mode (gun-lite) for better performance. */
|
|
12
|
+
multiMode?: boolean;
|
|
13
|
+
/** Idle timeout in seconds (default: 60). */
|
|
14
|
+
idle_timeout?: number;
|
|
15
|
+
/** Health check timeout in seconds (default: 20). */
|
|
16
|
+
health_check_timeout?: number;
|
|
17
|
+
/** Allow keepalive pings without active streams. */
|
|
18
|
+
permit_without_stream?: boolean;
|
|
19
|
+
/** Initial stream-level flow control window size. */
|
|
20
|
+
initial_windows_size?: number;
|
|
21
|
+
/** User-Agent header for gRPC client. */
|
|
22
|
+
user_agent?: string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=grpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.d.ts","sourceRoot":"","sources":["../../src/transport/grpc.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oDAAoD;IACpD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.js","sourceRoot":"","sources":["../../src/transport/grpc.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP/2 (h2) transport configuration.
|
|
3
|
+
* Note: This is the HTTP/2 transport, not the HTTP proxy protocol.
|
|
4
|
+
*
|
|
5
|
+
* @see https://xtls.github.io/en/config/transports/h2.html
|
|
6
|
+
*/
|
|
7
|
+
export interface HTTPTransportConfig {
|
|
8
|
+
/** Host list for HTTP/2 negotiation. */
|
|
9
|
+
host?: string[];
|
|
10
|
+
/** HTTP/2 path (default: "/"). */
|
|
11
|
+
path?: string;
|
|
12
|
+
/** Read idle timeout in seconds. */
|
|
13
|
+
read_idle_timeout?: number;
|
|
14
|
+
/** Health check timeout in seconds. */
|
|
15
|
+
health_check_timeout?: number;
|
|
16
|
+
/** HTTP method to use. */
|
|
17
|
+
method?: string;
|
|
18
|
+
/** Custom headers. */
|
|
19
|
+
headers?: Record<string, string[]>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transport/http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transport/http.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTPUpgrade transport configuration.
|
|
3
|
+
*
|
|
4
|
+
* @see https://xtls.github.io/en/config/transports/httpupgrade.html
|
|
5
|
+
*/
|
|
6
|
+
export interface HTTPUpgradeConfig {
|
|
7
|
+
/** Host header value. */
|
|
8
|
+
host?: string;
|
|
9
|
+
/** HTTP path (default: "/"). */
|
|
10
|
+
path?: string;
|
|
11
|
+
/** Custom HTTP headers for the upgrade request. */
|
|
12
|
+
headers?: Record<string, string>;
|
|
13
|
+
/** Accept PROXY protocol on inbound connections. */
|
|
14
|
+
acceptProxyProtocol?: boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=httpupgrade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpupgrade.d.ts","sourceRoot":"","sources":["../../src/transport/httpupgrade.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpupgrade.js","sourceRoot":"","sources":["../../src/transport/httpupgrade.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Bandwidth } from './common';
|
|
2
|
+
import type { UdpHopConfig } from './finalmask';
|
|
3
|
+
/**
|
|
4
|
+
* Hysteria2 transport configuration.
|
|
5
|
+
*
|
|
6
|
+
* @see https://xtls.github.io/en/config/transports/hysteria2.html
|
|
7
|
+
*/
|
|
8
|
+
export interface HysteriaConfig {
|
|
9
|
+
/** Hysteria version (2). */
|
|
10
|
+
version?: number;
|
|
11
|
+
/** Authentication password. */
|
|
12
|
+
auth?: string;
|
|
13
|
+
/** Congestion control algorithm (e.g. "bbr", "brutal"). */
|
|
14
|
+
congestion?: string;
|
|
15
|
+
/** Upload bandwidth (e.g. "100 mbps"). */
|
|
16
|
+
up?: Bandwidth;
|
|
17
|
+
/** Download bandwidth (e.g. "100 mbps"). */
|
|
18
|
+
down?: Bandwidth;
|
|
19
|
+
/** UDP hop configuration for port hopping. */
|
|
20
|
+
udphop?: UdpHopConfig;
|
|
21
|
+
/** UDP idle timeout in seconds. */
|
|
22
|
+
udpIdleTimeout?: number;
|
|
23
|
+
/** Masquerade configuration for disguising traffic. */
|
|
24
|
+
masquerade?: MasqueradeConfig;
|
|
25
|
+
}
|
|
26
|
+
export interface MasqueradeConfig {
|
|
27
|
+
/** Masquerade type. */
|
|
28
|
+
type?: MasqueradeType;
|
|
29
|
+
/** Directory to serve files from (for "file" type). */
|
|
30
|
+
dir?: string;
|
|
31
|
+
/** URL to proxy to (for "proxy" type). */
|
|
32
|
+
url?: string;
|
|
33
|
+
/** Rewrite Host header when proxying. */
|
|
34
|
+
rewriteHost?: boolean;
|
|
35
|
+
/** Allow insecure TLS for proxy target. */
|
|
36
|
+
insecure?: boolean;
|
|
37
|
+
/** Static content string (for "string" type). */
|
|
38
|
+
content?: string;
|
|
39
|
+
/** Custom HTTP headers for masquerade responses. */
|
|
40
|
+
headers?: Record<string, string>;
|
|
41
|
+
/** HTTP status code (for "string" type). */
|
|
42
|
+
statusCode?: number;
|
|
43
|
+
}
|
|
44
|
+
export type MasqueradeType = 'file' | 'proxy' | 'string';
|
|
45
|
+
//# sourceMappingURL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0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hysteria.js","sourceRoot":"","sources":["../../src/transport/hysteria.ts"],"names":[],"mappings":""}
|