delvedor / hpagent

A ready to use http and https agent for working with proxies that keeps connections alive!
MIT License
181 stars 37 forks source link

Can't work got w/ proxy & custom DNS resolving #118

Open lumpov opened 6 months ago

lumpov commented 6 months ago
const gotRequestOptions = {
    dnsLookupIpVersion: 4,
    dnsLookup: async function lookup(hostname, options, callback) {
        console.log('lookup', { hostname, options, callback });
    },
    agent: {
        http: new HttpProxyAgent(proxyParams),
        https: new HttpsProxyAgent(proxyParams),
    },
};

When used agent as proxy together with dnsLookup got doesn't call options.dnsLookup function. but in hpagent I cannot find any DNS possibilities to customisation.