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:
Gold John King
2024-12-24 22:46:30 +08:00
parent 4eb8c06706
commit ce89532f3d
2 changed files with 3 additions and 4 deletions
+1 -4
View File
@@ -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 }> {