-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.ts
88 lines (84 loc) · 2.11 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import defaultProxyFileRandomizer from "./src/server-middleware/util/modes/defaultProxyFileRandomizer";
import { genNonce } from "./src/server-middleware/util/tokens/crypto/genNonce";
import XORCypher from "./src/server-middleware/util/tokens/crypto/XORCypher";
const nonceLen = 10;
const config: MiddlewareConfig.Config = {
modes: {
proxyFileRandomization: {
enabled: true,
handler: () => genNonce(nonceLen),
},
// TODO: Cont...
},
proxyFileRandomization: {
enabled: true,
handler: defaultProxyFileRandomizer(5, 15),
},
methods: {
// TODO: Cont...
linkBotIntegration: {
enabled: true,
linksAffected: [""],
linkBotLocking: {
enabled: true,
tokens: {
subEncrypt: {
/** Recommended to be true. */
enabled: true,
/** Recommended to use XORCypher. Security isn't too much of a concern here and I would prioritize speed. */
cipher: XORCypher,
/** Recommended to be true. */
encryptNonce: true,
},
/** This is useless if network or browser fingerprints are disabled. */
symEncryption: {
/** Recommended to be true. */
enabled: true,
/** Recommended to be "blowfish". */
symEncryptionType: "blowfish",
},
/** The fingerprinting is what actually provides the defense to Filter Lock. So, disabling it would be highly
* discouraged. */
fingerprint: {
enabled: true,
networkFingerprint: {
enabled: true,
},
browserFingerprint: {
enabled: true,
},
},
},
},
},
filterLockTesting: {
enabled: true,
extensionDetection: {
enabled: true,
throughPingingResources: {
enabled: true,
map: new Map(),
},
throughPingingConnection: {
enabled: true,
},
throughNetworkTesting: {
enabled: true,
/** An array of the IDs to hopefully all extension filters */
knownFilters: [""],
},
},
requestDetection: {
enabled: true,
},
},
},
doubleLayerTLS: {
enabled: true,
encryptHeaders: true,
encryptBody: true,
KAA: "ECDH",
KAKeyECDHType: { name: "AES-GCM", length: 128 },
},
};
export default config;