diff --git a/server/index.ts b/server/index.ts index 506dfcec..cca0ab82 100644 --- a/server/index.ts +++ b/server/index.ts @@ -24,6 +24,7 @@ import avatarproxy from '@server/routes/avatarproxy'; import imageproxy from '@server/routes/imageproxy'; import { appDataPermissions } from '@server/utils/appDataVolume'; import { getAppVersion } from '@server/utils/appVersion'; +import createCustomProxyAgent from '@server/utils/customProxyAgent'; import restartFlag from '@server/utils/restartFlag'; import { getClientIp } from '@supercharge/request-ip'; import { TypeormStore } from 'connect-typeorm/out'; @@ -71,6 +72,11 @@ app const settings = await getSettings().load(); restartFlag.initializeSettings(settings); + // Register HTTP proxy + if (settings.network.proxy.enabled) { + await createCustomProxyAgent(settings.network.proxy); + } + // Migrate library types if ( settings.plex.libraries.length > 1 &&