possible proxy fix

This commit is contained in:
zefie
2025-06-20 06:47:43 -04:00
parent 91ef60996a
commit 52c6843ac2

View File

@@ -1263,7 +1263,7 @@ async function doHTTPProxy(socket, request_headers) {
// configure connection to an external proxy // configure connection to an external proxy
if (minisrv_config.services[request_type].external_proxy_is_socks) { if (minisrv_config.services[request_type].external_proxy_is_socks) {
// configure connection to remote socks proxy // configure connection to remote socks proxy
var ProxyAgent = require('proxy-agent'); const { ProxyAgent }= require('proxy-agent');
options.agent = new ProxyAgent("socks://" + (minisrv_config.services[request_type].external_proxy_host || "127.0.0.1") + ":" + minisrv_config.services[request_type].external_proxy_port); options.agent = new ProxyAgent("socks://" + (minisrv_config.services[request_type].external_proxy_host || "127.0.0.1") + ":" + minisrv_config.services[request_type].external_proxy_port);
} else { } else {
// configure connection to remote http proxy // configure connection to remote http proxy