Update node types

This commit is contained in:
Cohee
2024-10-12 11:36:26 +03:00
parent 89c0b0e1cd
commit 131e60ffe6
3 changed files with 17 additions and 18 deletions

View File

@ -1,11 +1,9 @@
import process from 'node:process';
import { createRequire } from 'node:module';
import http from 'node:http';
import https from 'node:https';
import { ProxyAgent } from 'proxy-agent';
import { isValidUrl, color } from './util.js';
const require = createRequire(import.meta.url);
const http = require('http');
const https = require('https');
const LOG_HEADER = '[Request Proxy]';
/**
@ -37,7 +35,6 @@ export default function initRequestProxy({ enabled, url, bypass }) {
// Reference: https://github.com/Rob--W/proxy-from-env
process.env.all_proxy = url;
if (Array.isArray(bypass) && bypass.length > 0) {
process.env.no_proxy = bypass.join(',');
}