mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
move proxy-helper init entry to main.ts for earlier init
so it can make earlier connections go through proxy as well
This commit is contained in:
@@ -25,6 +25,7 @@ import { FileAssociationService } from "./services/file-association.service";
|
||||
import { SongDetailsCacheService } from "./services/additional-content/maps/song-details-cache.service";
|
||||
import { readdirSync, statSync, unlinkSync } from "fs-extra";
|
||||
import { StaticConfigurationService } from "./services/static-configuration.service";
|
||||
import { configureProxy } from './helpers/proxy.helpers';
|
||||
|
||||
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
|
||||
const staticConfig = StaticConfigurationService.getInstance();
|
||||
@@ -46,6 +47,7 @@ staticConfig.take("disable-hadware-acceleration", disabled => {
|
||||
}
|
||||
});
|
||||
|
||||
configureProxy();
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
const sourceMapSupport = require("source-map-support");
|
||||
|
||||
@@ -11,7 +11,6 @@ import path from 'path';
|
||||
import { pipeline } from 'stream/promises';
|
||||
import sanitize from 'sanitize-filename';
|
||||
import internal from 'stream';
|
||||
import { configureProxy } from 'main/helpers/proxy.helpers';
|
||||
|
||||
export class RequestService {
|
||||
private static instance: RequestService;
|
||||
@@ -24,9 +23,7 @@ export class RequestService {
|
||||
return RequestService.instance;
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
configureProxy();
|
||||
}
|
||||
private constructor() {}
|
||||
|
||||
public async getJSON<T = unknown>(url: string): Promise<{ data: T; headers: IncomingHttpHeaders }> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user