delvedor / hpagent

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

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

Open lumpov opened 8 months ago

lumpov commented 8 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.