mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
fix: error when freebind is enabled
This commit is contained in:
parent
ea69fd8ded
commit
3f8d5c2208
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user