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

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