Quantcast
Channel: Active questions tagged whois - Stack Overflow
Viewing all articles
Browse latest Browse all 47

How can I implement a SOCKS proxy to make requests to the whois protocol?

$
0
0

Having trouble wrapping my head around making requests through the SOCKS proxy to whois.lookup.

I have a socks proxy (smartproxy) and a node server. I've tried tunnel, request, socks-proxy-agent, It seems I'm missing the mark completely.

Example of what I'm trying to accomplish:

const whois = require('whois');const { SocksProxyAgent } = require('socks-proxy-agent');const domain = 'google.com';const proxyAgent = new SocksProxyAgent(`socks5://myproxy`);whois.lookup(domain, { proxy: proxyAgent }, (err, data) => {    if (err) {        console.error(err.message);    } else {        console.log('WHOIS Data:', data);    }});

Viewing all articles
Browse latest Browse all 47

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>