mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
Refactor error logging to provide clearer context on provider failures
This commit is contained in:
@@ -156,9 +156,11 @@ async function getDispatcher(proxyUrl) {
|
||||
* Create HTTPS request with manual socket connection (bypass DNS)
|
||||
*/
|
||||
async function createBypassRequest(parsedUrl, realIP, options) {
|
||||
const https = await import("https");
|
||||
const net = await import("net");
|
||||
const { Readable } = await import("stream");
|
||||
const httpsModule = await import("https");
|
||||
const netModule = await import("net");
|
||||
// CJS modules expose exports via .default in ESM dynamic import context
|
||||
const https = httpsModule.default ?? httpsModule;
|
||||
const net = netModule.default ?? netModule;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const socket = new net.Socket();
|
||||
|
||||
Reference in New Issue
Block a user