@remnawave/xtls-sdk 0.13.0 → 0.15.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 +3 -1
- package/build/src/xray-protos/app/commander/config.js +1 -1
- package/build/src/xray-protos/app/dispatcher/config.js +1 -1
- package/build/src/xray-protos/app/geodata/config.d.ts +30 -0
- package/build/src/xray-protos/app/geodata/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/geodata/config.js +172 -0
- package/build/src/xray-protos/app/log/command/config.d.ts +2 -2
- package/build/src/xray-protos/app/log/command/config.d.ts.map +1 -1
- package/build/src/xray-protos/app/log/command/config.js +1 -1
- package/build/src/xray-protos/app/log/config.js +1 -1
- package/build/src/xray-protos/app/metrics/config.js +1 -1
- package/build/src/xray-protos/app/policy/config.js +1 -1
- package/build/src/xray-protos/app/proxyman/command/command.d.ts +20 -20
- package/build/src/xray-protos/app/proxyman/command/command.d.ts.map +1 -1
- package/build/src/xray-protos/app/proxyman/command/command.js +1 -1
- package/build/src/xray-protos/app/proxyman/config.js +1 -1
- package/build/src/xray-protos/app/reverse/config.js +1 -1
- package/build/src/xray-protos/app/router/command/command.d.ts +14 -14
- package/build/src/xray-protos/app/router/command/command.d.ts.map +1 -1
- package/build/src/xray-protos/app/router/command/command.js +1 -1
- package/build/src/xray-protos/app/stats/command/command.d.ts +14 -14
- package/build/src/xray-protos/app/stats/command/command.d.ts.map +1 -1
- package/build/src/xray-protos/app/stats/command/command.js +1 -1
- package/build/src/xray-protos/app/stats/config.js +1 -1
- package/build/src/xray-protos/app/version/config.js +1 -1
- package/build/src/xray-protos/common/geodata/geodat.js +1 -1
- package/build/src/xray-protos/common/log/log.js +1 -1
- package/build/src/xray-protos/common/net/address.js +1 -1
- package/build/src/xray-protos/common/net/destination.js +1 -1
- package/build/src/xray-protos/common/net/network.js +1 -1
- package/build/src/xray-protos/common/net/port.js +1 -1
- package/build/src/xray-protos/common/protocol/headers.js +1 -1
- package/build/src/xray-protos/common/protocol/server_spec.js +1 -1
- package/build/src/xray-protos/common/protocol/user.js +1 -1
- package/build/src/xray-protos/common/serial/typed_message.js +1 -1
- package/build/src/xray-protos/core/config.js +1 -1
- package/build/src/xray-protos/proxy/blackhole/config.js +1 -1
- package/build/src/xray-protos/proxy/dns/config.d.ts +20 -7
- package/build/src/xray-protos/proxy/dns/config.d.ts.map +1 -1
- package/build/src/xray-protos/proxy/dns/config.js +191 -55
- package/build/src/xray-protos/proxy/dokodemo/config.d.ts +4 -4
- package/build/src/xray-protos/proxy/dokodemo/config.d.ts.map +1 -1
- package/build/src/xray-protos/proxy/dokodemo/config.js +55 -43
- package/build/src/xray-protos/proxy/freedom/config.d.ts +24 -5
- package/build/src/xray-protos/proxy/freedom/config.d.ts.map +1 -1
- package/build/src/xray-protos/proxy/freedom/config.js +225 -33
- package/build/src/xray-protos/proxy/http/config.js +1 -1
- package/build/src/xray-protos/proxy/hysteria/account/config.js +1 -1
- package/build/src/xray-protos/proxy/hysteria/config.js +1 -1
- package/build/src/xray-protos/proxy/loopback/config.js +1 -1
- package/build/src/xray-protos/proxy/shadowsocks/config.js +1 -1
- package/build/src/xray-protos/proxy/shadowsocks_2022/config.js +1 -1
- package/build/src/xray-protos/proxy/socks/config.js +1 -1
- package/build/src/xray-protos/proxy/trojan/config.js +1 -1
- package/build/src/xray-protos/proxy/tun/config.js +1 -1
- package/build/src/xray-protos/proxy/vless/account.js +1 -1
- package/build/src/xray-protos/proxy/vless/encoding/addons.js +1 -1
- package/build/src/xray-protos/proxy/vless/inbound/config.d.ts +1 -1
- package/build/src/xray-protos/proxy/vless/inbound/config.d.ts.map +1 -1
- package/build/src/xray-protos/proxy/vless/inbound/config.js +8 -8
- package/build/src/xray-protos/proxy/vless/outbound/config.js +1 -1
- package/build/src/xray-protos/proxy/vmess/account.js +1 -1
- package/build/src/xray-protos/proxy/vmess/inbound/config.js +1 -1
- package/build/src/xray-protos/proxy/vmess/outbound/config.js +1 -1
- package/build/src/xray-protos/proxy/wireguard/config.js +1 -1
- package/build/src/xray-protos/transport/internet/config.d.ts +0 -2
- package/build/src/xray-protos/transport/internet/config.d.ts.map +1 -1
- package/build/src/xray-protos/transport/internet/config.js +1 -66
- package/build/src/xray-protos/typeRegistry.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/xray-protos/proxy/dokodemo/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAkC,MAAM,0BAA0B,CAAC;AAGnF,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,4BAA4B,CAAC;IACpC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/xray-protos/proxy/dokodemo/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAkC,MAAM,0BAA0B,CAAC;AAGnF,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,4BAA4B,CAAC;IACpC,kDAAkD;IAClD,eAAe,EAAE,OAAO,EAAE,CAAC;IAC3B,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnC,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;A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,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACxC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc v6.33.4
|
|
6
6
|
// source: proxy/dokodemo/config.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -15,10 +15,10 @@ exports.protobufPackage = "xray.proxy.dokodemo";
|
|
|
15
15
|
function createBaseConfig() {
|
|
16
16
|
return {
|
|
17
17
|
$type: "xray.proxy.dokodemo.Config",
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
allowedNetworks: [],
|
|
19
|
+
rewriteAddress: undefined,
|
|
20
|
+
rewritePort: 0,
|
|
20
21
|
portMap: {},
|
|
21
|
-
networks: [],
|
|
22
22
|
followRedirect: false,
|
|
23
23
|
userLevel: 0,
|
|
24
24
|
};
|
|
@@ -26,20 +26,20 @@ function createBaseConfig() {
|
|
|
26
26
|
exports.Config = {
|
|
27
27
|
$type: "xray.proxy.dokodemo.Config",
|
|
28
28
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
writer.uint32(58).fork();
|
|
30
|
+
for (const v of message.allowedNetworks) {
|
|
31
|
+
writer.int32(v);
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
writer.join();
|
|
34
|
+
if (message.rewriteAddress !== undefined) {
|
|
35
|
+
address_1.IPOrDomain.encode(message.rewriteAddress, writer.uint32(10).fork()).join();
|
|
36
|
+
}
|
|
37
|
+
if (message.rewritePort !== 0) {
|
|
38
|
+
writer.uint32(16).uint32(message.rewritePort);
|
|
34
39
|
}
|
|
35
40
|
globalThis.Object.entries(message.portMap).forEach(([key, value]) => {
|
|
36
41
|
exports.Config_PortMapEntry.encode({ $type: "xray.proxy.dokodemo.Config.PortMapEntry", key: key, value }, writer.uint32(26).fork()).join();
|
|
37
42
|
});
|
|
38
|
-
writer.uint32(58).fork();
|
|
39
|
-
for (const v of message.networks) {
|
|
40
|
-
writer.int32(v);
|
|
41
|
-
}
|
|
42
|
-
writer.join();
|
|
43
43
|
if (message.followRedirect !== false) {
|
|
44
44
|
writer.uint32(40).bool(message.followRedirect);
|
|
45
45
|
}
|
|
@@ -55,18 +55,32 @@ exports.Config = {
|
|
|
55
55
|
while (reader.pos < end) {
|
|
56
56
|
const tag = reader.uint32();
|
|
57
57
|
switch (tag >>> 3) {
|
|
58
|
+
case 7: {
|
|
59
|
+
if (tag === 56) {
|
|
60
|
+
message.allowedNetworks.push(reader.int32());
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (tag === 58) {
|
|
64
|
+
const end2 = reader.uint32() + reader.pos;
|
|
65
|
+
while (reader.pos < end2) {
|
|
66
|
+
message.allowedNetworks.push(reader.int32());
|
|
67
|
+
}
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
58
72
|
case 1: {
|
|
59
73
|
if (tag !== 10) {
|
|
60
74
|
break;
|
|
61
75
|
}
|
|
62
|
-
message.
|
|
76
|
+
message.rewriteAddress = address_1.IPOrDomain.decode(reader, reader.uint32());
|
|
63
77
|
continue;
|
|
64
78
|
}
|
|
65
79
|
case 2: {
|
|
66
80
|
if (tag !== 16) {
|
|
67
81
|
break;
|
|
68
82
|
}
|
|
69
|
-
message.
|
|
83
|
+
message.rewritePort = reader.uint32();
|
|
70
84
|
continue;
|
|
71
85
|
}
|
|
72
86
|
case 3: {
|
|
@@ -79,20 +93,6 @@ exports.Config = {
|
|
|
79
93
|
}
|
|
80
94
|
continue;
|
|
81
95
|
}
|
|
82
|
-
case 7: {
|
|
83
|
-
if (tag === 56) {
|
|
84
|
-
message.networks.push(reader.int32());
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (tag === 58) {
|
|
88
|
-
const end2 = reader.uint32() + reader.pos;
|
|
89
|
-
while (reader.pos < end2) {
|
|
90
|
-
message.networks.push(reader.int32());
|
|
91
|
-
}
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
96
|
case 5: {
|
|
97
97
|
if (tag !== 40) {
|
|
98
98
|
break;
|
|
@@ -118,8 +118,21 @@ exports.Config = {
|
|
|
118
118
|
fromJSON(object) {
|
|
119
119
|
return {
|
|
120
120
|
$type: exports.Config.$type,
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
allowedNetworks: globalThis.Array.isArray(object?.allowedNetworks)
|
|
122
|
+
? object.allowedNetworks.map((e) => (0, network_1.networkFromJSON)(e))
|
|
123
|
+
: globalThis.Array.isArray(object?.allowed_networks)
|
|
124
|
+
? object.allowed_networks.map((e) => (0, network_1.networkFromJSON)(e))
|
|
125
|
+
: [],
|
|
126
|
+
rewriteAddress: isSet(object.rewriteAddress)
|
|
127
|
+
? address_1.IPOrDomain.fromJSON(object.rewriteAddress)
|
|
128
|
+
: isSet(object.rewrite_address)
|
|
129
|
+
? address_1.IPOrDomain.fromJSON(object.rewrite_address)
|
|
130
|
+
: undefined,
|
|
131
|
+
rewritePort: isSet(object.rewritePort)
|
|
132
|
+
? globalThis.Number(object.rewritePort)
|
|
133
|
+
: isSet(object.rewrite_port)
|
|
134
|
+
? globalThis.Number(object.rewrite_port)
|
|
135
|
+
: 0,
|
|
123
136
|
portMap: isObject(object.portMap)
|
|
124
137
|
? globalThis.Object.entries(object.portMap).reduce((acc, [key, value]) => {
|
|
125
138
|
acc[key] = globalThis.String(value);
|
|
@@ -131,7 +144,6 @@ exports.Config = {
|
|
|
131
144
|
return acc;
|
|
132
145
|
}, {})
|
|
133
146
|
: {},
|
|
134
|
-
networks: globalThis.Array.isArray(object?.networks) ? object.networks.map((e) => (0, network_1.networkFromJSON)(e)) : [],
|
|
135
147
|
followRedirect: isSet(object.followRedirect)
|
|
136
148
|
? globalThis.Boolean(object.followRedirect)
|
|
137
149
|
: isSet(object.follow_redirect)
|
|
@@ -146,11 +158,14 @@ exports.Config = {
|
|
|
146
158
|
},
|
|
147
159
|
toJSON(message) {
|
|
148
160
|
const obj = {};
|
|
149
|
-
if (message.
|
|
150
|
-
obj.
|
|
161
|
+
if (message.allowedNetworks?.length) {
|
|
162
|
+
obj.allowedNetworks = message.allowedNetworks.map((e) => (0, network_1.networkToJSON)(e));
|
|
151
163
|
}
|
|
152
|
-
if (message.
|
|
153
|
-
obj.
|
|
164
|
+
if (message.rewriteAddress !== undefined) {
|
|
165
|
+
obj.rewriteAddress = address_1.IPOrDomain.toJSON(message.rewriteAddress);
|
|
166
|
+
}
|
|
167
|
+
if (message.rewritePort !== 0) {
|
|
168
|
+
obj.rewritePort = Math.round(message.rewritePort);
|
|
154
169
|
}
|
|
155
170
|
if (message.portMap) {
|
|
156
171
|
const entries = globalThis.Object.entries(message.portMap);
|
|
@@ -161,9 +176,6 @@ exports.Config = {
|
|
|
161
176
|
});
|
|
162
177
|
}
|
|
163
178
|
}
|
|
164
|
-
if (message.networks?.length) {
|
|
165
|
-
obj.networks = message.networks.map((e) => (0, network_1.networkToJSON)(e));
|
|
166
|
-
}
|
|
167
179
|
if (message.followRedirect !== false) {
|
|
168
180
|
obj.followRedirect = message.followRedirect;
|
|
169
181
|
}
|
|
@@ -177,17 +189,17 @@ exports.Config = {
|
|
|
177
189
|
},
|
|
178
190
|
fromPartial(object) {
|
|
179
191
|
const message = createBaseConfig();
|
|
180
|
-
message.
|
|
181
|
-
|
|
192
|
+
message.allowedNetworks = object.allowedNetworks?.map((e) => e) || [];
|
|
193
|
+
message.rewriteAddress = (object.rewriteAddress !== undefined && object.rewriteAddress !== null)
|
|
194
|
+
? address_1.IPOrDomain.fromPartial(object.rewriteAddress)
|
|
182
195
|
: undefined;
|
|
183
|
-
message.
|
|
196
|
+
message.rewritePort = object.rewritePort ?? 0;
|
|
184
197
|
message.portMap = globalThis.Object.entries(object.portMap ?? {}).reduce((acc, [key, value]) => {
|
|
185
198
|
if (value !== undefined) {
|
|
186
199
|
acc[key] = globalThis.String(value);
|
|
187
200
|
}
|
|
188
201
|
return acc;
|
|
189
202
|
}, {});
|
|
190
|
-
message.networks = object.networks?.map((e) => e) || [];
|
|
191
203
|
message.followRedirect = object.followRedirect ?? false;
|
|
192
204
|
message.userLevel = object.userLevel ?? 0;
|
|
193
205
|
return message;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { IPRule } from "../../common/geodata/geodat";
|
|
3
|
+
import { Network } from "../../common/net/network";
|
|
4
|
+
import { PortList } from "../../common/net/port";
|
|
3
5
|
import { ServerEndpoint } from "../../common/protocol/server_spec";
|
|
4
6
|
import { DomainStrategy } from "../../transport/internet/config";
|
|
5
7
|
export declare const protobufPackage = "xray.proxy.freedom";
|
|
8
|
+
export declare enum RuleAction {
|
|
9
|
+
Allow = 0,
|
|
10
|
+
Block = 1,
|
|
11
|
+
UNRECOGNIZED = -1
|
|
12
|
+
}
|
|
13
|
+
export declare function ruleActionFromJSON(object: any): RuleAction;
|
|
14
|
+
export declare function ruleActionToJSON(object: RuleAction): string;
|
|
6
15
|
export interface DestinationOverride {
|
|
7
16
|
$type: "xray.proxy.freedom.DestinationOverride";
|
|
8
17
|
server: ServerEndpoint | undefined;
|
|
@@ -27,9 +36,18 @@ export interface Noise {
|
|
|
27
36
|
packet: Uint8Array;
|
|
28
37
|
applyTo: string;
|
|
29
38
|
}
|
|
30
|
-
export interface
|
|
31
|
-
$type: "xray.proxy.freedom.
|
|
32
|
-
|
|
39
|
+
export interface Range {
|
|
40
|
+
$type: "xray.proxy.freedom.Range";
|
|
41
|
+
min: number;
|
|
42
|
+
max: number;
|
|
43
|
+
}
|
|
44
|
+
export interface FinalRuleConfig {
|
|
45
|
+
$type: "xray.proxy.freedom.FinalRuleConfig";
|
|
46
|
+
action: RuleAction;
|
|
47
|
+
networks: Network[];
|
|
48
|
+
portList: PortList | undefined;
|
|
49
|
+
ip: IPRule[];
|
|
50
|
+
blockDelay: Range | undefined;
|
|
33
51
|
}
|
|
34
52
|
export interface Config {
|
|
35
53
|
$type: "xray.proxy.freedom.Config";
|
|
@@ -39,12 +57,13 @@ export interface Config {
|
|
|
39
57
|
fragment: Fragment | undefined;
|
|
40
58
|
proxyProtocol: number;
|
|
41
59
|
noises: Noise[];
|
|
42
|
-
|
|
60
|
+
finalRules: FinalRuleConfig[];
|
|
43
61
|
}
|
|
44
62
|
export declare const DestinationOverride: MessageFns<DestinationOverride, "xray.proxy.freedom.DestinationOverride">;
|
|
45
63
|
export declare const Fragment: MessageFns<Fragment, "xray.proxy.freedom.Fragment">;
|
|
46
64
|
export declare const Noise: MessageFns<Noise, "xray.proxy.freedom.Noise">;
|
|
47
|
-
export declare const
|
|
65
|
+
export declare const Range: MessageFns<Range, "xray.proxy.freedom.Range">;
|
|
66
|
+
export declare const FinalRuleConfig: MessageFns<FinalRuleConfig, "xray.proxy.freedom.FinalRuleConfig">;
|
|
48
67
|
export declare const Config: MessageFns<Config, "xray.proxy.freedom.Config">;
|
|
49
68
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
50
69
|
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 {} ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/xray-protos/proxy/freedom/config.ts"],"names":[],"mappings":"AAOA,OAAO,EA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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;AAiBf,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,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACxC"}
|
|
@@ -1,18 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc v6.33.4
|
|
6
6
|
// source: proxy/freedom/config.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Config = exports.
|
|
8
|
+
exports.Config = exports.FinalRuleConfig = exports.Range = exports.Noise = exports.Fragment = exports.DestinationOverride = exports.RuleAction = exports.protobufPackage = void 0;
|
|
9
|
+
exports.ruleActionFromJSON = ruleActionFromJSON;
|
|
10
|
+
exports.ruleActionToJSON = ruleActionToJSON;
|
|
9
11
|
/* eslint-disable */
|
|
10
12
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
13
|
const geodat_1 = require("../../common/geodata/geodat");
|
|
14
|
+
const network_1 = require("../../common/net/network");
|
|
15
|
+
const port_1 = require("../../common/net/port");
|
|
12
16
|
const server_spec_1 = require("../../common/protocol/server_spec");
|
|
13
17
|
const config_1 = require("../../transport/internet/config");
|
|
14
18
|
const typeRegistry_1 = require("../../typeRegistry");
|
|
15
19
|
exports.protobufPackage = "xray.proxy.freedom";
|
|
20
|
+
var RuleAction;
|
|
21
|
+
(function (RuleAction) {
|
|
22
|
+
RuleAction[RuleAction["Allow"] = 0] = "Allow";
|
|
23
|
+
RuleAction[RuleAction["Block"] = 1] = "Block";
|
|
24
|
+
RuleAction[RuleAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
25
|
+
})(RuleAction || (exports.RuleAction = RuleAction = {}));
|
|
26
|
+
function ruleActionFromJSON(object) {
|
|
27
|
+
switch (object) {
|
|
28
|
+
case 0:
|
|
29
|
+
case "Allow":
|
|
30
|
+
return RuleAction.Allow;
|
|
31
|
+
case 1:
|
|
32
|
+
case "Block":
|
|
33
|
+
return RuleAction.Block;
|
|
34
|
+
case -1:
|
|
35
|
+
case "UNRECOGNIZED":
|
|
36
|
+
default:
|
|
37
|
+
return RuleAction.UNRECOGNIZED;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function ruleActionToJSON(object) {
|
|
41
|
+
switch (object) {
|
|
42
|
+
case RuleAction.Allow:
|
|
43
|
+
return "Allow";
|
|
44
|
+
case RuleAction.Block:
|
|
45
|
+
return "Block";
|
|
46
|
+
case RuleAction.UNRECOGNIZED:
|
|
47
|
+
default:
|
|
48
|
+
return "UNRECOGNIZED";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
16
51
|
function createBaseDestinationOverride() {
|
|
17
52
|
return { $type: "xray.proxy.freedom.DestinationOverride", server: undefined };
|
|
18
53
|
}
|
|
@@ -433,29 +468,39 @@ exports.Noise = {
|
|
|
433
468
|
},
|
|
434
469
|
};
|
|
435
470
|
typeRegistry_1.messageTypeRegistry.set(exports.Noise.$type, exports.Noise);
|
|
436
|
-
function
|
|
437
|
-
return { $type: "xray.proxy.freedom.
|
|
471
|
+
function createBaseRange() {
|
|
472
|
+
return { $type: "xray.proxy.freedom.Range", min: 0, max: 0 };
|
|
438
473
|
}
|
|
439
|
-
exports.
|
|
440
|
-
$type: "xray.proxy.freedom.
|
|
474
|
+
exports.Range = {
|
|
475
|
+
$type: "xray.proxy.freedom.Range",
|
|
441
476
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
442
|
-
|
|
443
|
-
|
|
477
|
+
if (message.min !== 0) {
|
|
478
|
+
writer.uint32(8).uint64(message.min);
|
|
479
|
+
}
|
|
480
|
+
if (message.max !== 0) {
|
|
481
|
+
writer.uint32(16).uint64(message.max);
|
|
444
482
|
}
|
|
445
483
|
return writer;
|
|
446
484
|
},
|
|
447
485
|
decode(input, length) {
|
|
448
486
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
449
487
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
450
|
-
const message =
|
|
488
|
+
const message = createBaseRange();
|
|
451
489
|
while (reader.pos < end) {
|
|
452
490
|
const tag = reader.uint32();
|
|
453
491
|
switch (tag >>> 3) {
|
|
454
492
|
case 1: {
|
|
455
|
-
if (tag !==
|
|
493
|
+
if (tag !== 8) {
|
|
456
494
|
break;
|
|
457
495
|
}
|
|
458
|
-
message.
|
|
496
|
+
message.min = longToNumber(reader.uint64());
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
case 2: {
|
|
500
|
+
if (tag !== 16) {
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
message.max = longToNumber(reader.uint64());
|
|
459
504
|
continue;
|
|
460
505
|
}
|
|
461
506
|
}
|
|
@@ -468,27 +513,176 @@ exports.IPRules = {
|
|
|
468
513
|
},
|
|
469
514
|
fromJSON(object) {
|
|
470
515
|
return {
|
|
471
|
-
$type: exports.
|
|
472
|
-
|
|
516
|
+
$type: exports.Range.$type,
|
|
517
|
+
min: isSet(object.min) ? globalThis.Number(object.min) : 0,
|
|
518
|
+
max: isSet(object.max) ? globalThis.Number(object.max) : 0,
|
|
473
519
|
};
|
|
474
520
|
},
|
|
475
521
|
toJSON(message) {
|
|
476
522
|
const obj = {};
|
|
477
|
-
if (message.
|
|
478
|
-
obj.
|
|
523
|
+
if (message.min !== 0) {
|
|
524
|
+
obj.min = Math.round(message.min);
|
|
525
|
+
}
|
|
526
|
+
if (message.max !== 0) {
|
|
527
|
+
obj.max = Math.round(message.max);
|
|
479
528
|
}
|
|
480
529
|
return obj;
|
|
481
530
|
},
|
|
482
531
|
create(base) {
|
|
483
|
-
return exports.
|
|
532
|
+
return exports.Range.fromPartial(base ?? {});
|
|
484
533
|
},
|
|
485
534
|
fromPartial(object) {
|
|
486
|
-
const message =
|
|
487
|
-
message.
|
|
535
|
+
const message = createBaseRange();
|
|
536
|
+
message.min = object.min ?? 0;
|
|
537
|
+
message.max = object.max ?? 0;
|
|
488
538
|
return message;
|
|
489
539
|
},
|
|
490
540
|
};
|
|
491
|
-
typeRegistry_1.messageTypeRegistry.set(exports.
|
|
541
|
+
typeRegistry_1.messageTypeRegistry.set(exports.Range.$type, exports.Range);
|
|
542
|
+
function createBaseFinalRuleConfig() {
|
|
543
|
+
return {
|
|
544
|
+
$type: "xray.proxy.freedom.FinalRuleConfig",
|
|
545
|
+
action: 0,
|
|
546
|
+
networks: [],
|
|
547
|
+
portList: undefined,
|
|
548
|
+
ip: [],
|
|
549
|
+
blockDelay: undefined,
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
exports.FinalRuleConfig = {
|
|
553
|
+
$type: "xray.proxy.freedom.FinalRuleConfig",
|
|
554
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
555
|
+
if (message.action !== 0) {
|
|
556
|
+
writer.uint32(8).int32(message.action);
|
|
557
|
+
}
|
|
558
|
+
writer.uint32(18).fork();
|
|
559
|
+
for (const v of message.networks) {
|
|
560
|
+
writer.int32(v);
|
|
561
|
+
}
|
|
562
|
+
writer.join();
|
|
563
|
+
if (message.portList !== undefined) {
|
|
564
|
+
port_1.PortList.encode(message.portList, writer.uint32(26).fork()).join();
|
|
565
|
+
}
|
|
566
|
+
for (const v of message.ip) {
|
|
567
|
+
geodat_1.IPRule.encode(v, writer.uint32(34).fork()).join();
|
|
568
|
+
}
|
|
569
|
+
if (message.blockDelay !== undefined) {
|
|
570
|
+
exports.Range.encode(message.blockDelay, writer.uint32(42).fork()).join();
|
|
571
|
+
}
|
|
572
|
+
return writer;
|
|
573
|
+
},
|
|
574
|
+
decode(input, length) {
|
|
575
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
576
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
577
|
+
const message = createBaseFinalRuleConfig();
|
|
578
|
+
while (reader.pos < end) {
|
|
579
|
+
const tag = reader.uint32();
|
|
580
|
+
switch (tag >>> 3) {
|
|
581
|
+
case 1: {
|
|
582
|
+
if (tag !== 8) {
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
message.action = reader.int32();
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
588
|
+
case 2: {
|
|
589
|
+
if (tag === 16) {
|
|
590
|
+
message.networks.push(reader.int32());
|
|
591
|
+
continue;
|
|
592
|
+
}
|
|
593
|
+
if (tag === 18) {
|
|
594
|
+
const end2 = reader.uint32() + reader.pos;
|
|
595
|
+
while (reader.pos < end2) {
|
|
596
|
+
message.networks.push(reader.int32());
|
|
597
|
+
}
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
case 3: {
|
|
603
|
+
if (tag !== 26) {
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
606
|
+
message.portList = port_1.PortList.decode(reader, reader.uint32());
|
|
607
|
+
continue;
|
|
608
|
+
}
|
|
609
|
+
case 4: {
|
|
610
|
+
if (tag !== 34) {
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
message.ip.push(geodat_1.IPRule.decode(reader, reader.uint32()));
|
|
614
|
+
continue;
|
|
615
|
+
}
|
|
616
|
+
case 5: {
|
|
617
|
+
if (tag !== 42) {
|
|
618
|
+
break;
|
|
619
|
+
}
|
|
620
|
+
message.blockDelay = exports.Range.decode(reader, reader.uint32());
|
|
621
|
+
continue;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
reader.skip(tag & 7);
|
|
628
|
+
}
|
|
629
|
+
return message;
|
|
630
|
+
},
|
|
631
|
+
fromJSON(object) {
|
|
632
|
+
return {
|
|
633
|
+
$type: exports.FinalRuleConfig.$type,
|
|
634
|
+
action: isSet(object.action) ? ruleActionFromJSON(object.action) : 0,
|
|
635
|
+
networks: globalThis.Array.isArray(object?.networks) ? object.networks.map((e) => (0, network_1.networkFromJSON)(e)) : [],
|
|
636
|
+
portList: isSet(object.portList)
|
|
637
|
+
? port_1.PortList.fromJSON(object.portList)
|
|
638
|
+
: isSet(object.port_list)
|
|
639
|
+
? port_1.PortList.fromJSON(object.port_list)
|
|
640
|
+
: undefined,
|
|
641
|
+
ip: globalThis.Array.isArray(object?.ip) ? object.ip.map((e) => geodat_1.IPRule.fromJSON(e)) : [],
|
|
642
|
+
blockDelay: isSet(object.blockDelay)
|
|
643
|
+
? exports.Range.fromJSON(object.blockDelay)
|
|
644
|
+
: isSet(object.block_delay)
|
|
645
|
+
? exports.Range.fromJSON(object.block_delay)
|
|
646
|
+
: undefined,
|
|
647
|
+
};
|
|
648
|
+
},
|
|
649
|
+
toJSON(message) {
|
|
650
|
+
const obj = {};
|
|
651
|
+
if (message.action !== 0) {
|
|
652
|
+
obj.action = ruleActionToJSON(message.action);
|
|
653
|
+
}
|
|
654
|
+
if (message.networks?.length) {
|
|
655
|
+
obj.networks = message.networks.map((e) => (0, network_1.networkToJSON)(e));
|
|
656
|
+
}
|
|
657
|
+
if (message.portList !== undefined) {
|
|
658
|
+
obj.portList = port_1.PortList.toJSON(message.portList);
|
|
659
|
+
}
|
|
660
|
+
if (message.ip?.length) {
|
|
661
|
+
obj.ip = message.ip.map((e) => geodat_1.IPRule.toJSON(e));
|
|
662
|
+
}
|
|
663
|
+
if (message.blockDelay !== undefined) {
|
|
664
|
+
obj.blockDelay = exports.Range.toJSON(message.blockDelay);
|
|
665
|
+
}
|
|
666
|
+
return obj;
|
|
667
|
+
},
|
|
668
|
+
create(base) {
|
|
669
|
+
return exports.FinalRuleConfig.fromPartial(base ?? {});
|
|
670
|
+
},
|
|
671
|
+
fromPartial(object) {
|
|
672
|
+
const message = createBaseFinalRuleConfig();
|
|
673
|
+
message.action = object.action ?? 0;
|
|
674
|
+
message.networks = object.networks?.map((e) => e) || [];
|
|
675
|
+
message.portList = (object.portList !== undefined && object.portList !== null)
|
|
676
|
+
? port_1.PortList.fromPartial(object.portList)
|
|
677
|
+
: undefined;
|
|
678
|
+
message.ip = object.ip?.map((e) => geodat_1.IPRule.fromPartial(e)) || [];
|
|
679
|
+
message.blockDelay = (object.blockDelay !== undefined && object.blockDelay !== null)
|
|
680
|
+
? exports.Range.fromPartial(object.blockDelay)
|
|
681
|
+
: undefined;
|
|
682
|
+
return message;
|
|
683
|
+
},
|
|
684
|
+
};
|
|
685
|
+
typeRegistry_1.messageTypeRegistry.set(exports.FinalRuleConfig.$type, exports.FinalRuleConfig);
|
|
492
686
|
function createBaseConfig() {
|
|
493
687
|
return {
|
|
494
688
|
$type: "xray.proxy.freedom.Config",
|
|
@@ -498,7 +692,7 @@ function createBaseConfig() {
|
|
|
498
692
|
fragment: undefined,
|
|
499
693
|
proxyProtocol: 0,
|
|
500
694
|
noises: [],
|
|
501
|
-
|
|
695
|
+
finalRules: [],
|
|
502
696
|
};
|
|
503
697
|
}
|
|
504
698
|
exports.Config = {
|
|
@@ -522,8 +716,8 @@ exports.Config = {
|
|
|
522
716
|
for (const v of message.noises) {
|
|
523
717
|
exports.Noise.encode(v, writer.uint32(58).fork()).join();
|
|
524
718
|
}
|
|
525
|
-
|
|
526
|
-
exports.
|
|
719
|
+
for (const v of message.finalRules) {
|
|
720
|
+
exports.FinalRuleConfig.encode(v, writer.uint32(66).fork()).join();
|
|
527
721
|
}
|
|
528
722
|
return writer;
|
|
529
723
|
},
|
|
@@ -580,7 +774,7 @@ exports.Config = {
|
|
|
580
774
|
if (tag !== 66) {
|
|
581
775
|
break;
|
|
582
776
|
}
|
|
583
|
-
message.
|
|
777
|
+
message.finalRules.push(exports.FinalRuleConfig.decode(reader, reader.uint32()));
|
|
584
778
|
continue;
|
|
585
779
|
}
|
|
586
780
|
}
|
|
@@ -616,11 +810,11 @@ exports.Config = {
|
|
|
616
810
|
? globalThis.Number(object.proxy_protocol)
|
|
617
811
|
: 0,
|
|
618
812
|
noises: globalThis.Array.isArray(object?.noises) ? object.noises.map((e) => exports.Noise.fromJSON(e)) : [],
|
|
619
|
-
|
|
620
|
-
? exports.
|
|
621
|
-
:
|
|
622
|
-
? exports.
|
|
623
|
-
:
|
|
813
|
+
finalRules: globalThis.Array.isArray(object?.finalRules)
|
|
814
|
+
? object.finalRules.map((e) => exports.FinalRuleConfig.fromJSON(e))
|
|
815
|
+
: globalThis.Array.isArray(object?.final_rules)
|
|
816
|
+
? object.final_rules.map((e) => exports.FinalRuleConfig.fromJSON(e))
|
|
817
|
+
: [],
|
|
624
818
|
};
|
|
625
819
|
},
|
|
626
820
|
toJSON(message) {
|
|
@@ -643,8 +837,8 @@ exports.Config = {
|
|
|
643
837
|
if (message.noises?.length) {
|
|
644
838
|
obj.noises = message.noises.map((e) => exports.Noise.toJSON(e));
|
|
645
839
|
}
|
|
646
|
-
if (message.
|
|
647
|
-
obj.
|
|
840
|
+
if (message.finalRules?.length) {
|
|
841
|
+
obj.finalRules = message.finalRules.map((e) => exports.FinalRuleConfig.toJSON(e));
|
|
648
842
|
}
|
|
649
843
|
return obj;
|
|
650
844
|
},
|
|
@@ -663,9 +857,7 @@ exports.Config = {
|
|
|
663
857
|
: undefined;
|
|
664
858
|
message.proxyProtocol = object.proxyProtocol ?? 0;
|
|
665
859
|
message.noises = object.noises?.map((e) => exports.Noise.fromPartial(e)) || [];
|
|
666
|
-
message.
|
|
667
|
-
? exports.IPRules.fromPartial(object.ipsBlocked)
|
|
668
|
-
: undefined;
|
|
860
|
+
message.finalRules = object.finalRules?.map((e) => exports.FinalRuleConfig.fromPartial(e)) || [];
|
|
669
861
|
return message;
|
|
670
862
|
},
|
|
671
863
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc v6.33.4
|
|
6
6
|
// source: proxy/http/config.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc v6.33.4
|
|
6
6
|
// source: proxy/hysteria/account/config.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc v6.33.4
|
|
6
6
|
// source: proxy/hysteria/config.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.11.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.8
|
|
5
5
|
// protoc v6.33.4
|
|
6
6
|
// source: proxy/loopback/config.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|