fix: error when freebind is enabled

This commit is contained in:
alina sireneva 2024-07-09 16:41:48 +03:00
parent ea69fd8ded
commit 3f8d5c2208
No known key found for this signature in database

View File

@ -221,6 +221,10 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
setInterval(randomizeCiphers, 1000 * 60 * 30); // shuffle ciphers every 30 minutes
if (env.externalProxy) {
if (env.freebindCIDR) {
throw new Error('Freebind is not available when external proxy is enabled')
}
setGlobalDispatcher(new ProxyAgent(env.externalProxy))
}