api: randomize cipherlist for making requests to services (#574)
this makes cobalt less prone to TLS client fingerprinting, as it avoids having the default node.js TLS fingerprint that is shared by all node.js applications.
This commit is contained in:
@@ -10,6 +10,7 @@ import loc from "../localization/manager.js";
|
||||
|
||||
import { createResponse, normalizeRequest, getIP } from "../modules/processing/request.js";
|
||||
import { verifyStream, getInternalStream } from "../modules/stream/manage.js";
|
||||
import { randomizeCiphers } from '../modules/sub/randomize-ciphers.js';
|
||||
import { extract } from "../modules/processing/url.js";
|
||||
import match from "../modules/processing/match.js";
|
||||
import stream from "../modules/stream/stream.js";
|
||||
@@ -215,6 +216,9 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
|
||||
res.redirect('/api/serverInfo')
|
||||
})
|
||||
|
||||
randomizeCiphers();
|
||||
setInterval(randomizeCiphers, 1000 * 60 * 30); // shuffle ciphers every 30 minutes
|
||||
|
||||
app.listen(env.apiPort, env.listenAddress, () => {
|
||||
console.log(`\n` +
|
||||
`${Cyan("cobalt")} API ${Bright(`v.${version}-${gitCommit} (${gitBranch})`)}\n` +
|
||||
|
||||
Reference in New Issue
Block a user