I tried exporting into http_proxy and https_proxy but that didn't seem to work.
I am guessing that there is another way to use a proxy when querying whois information from the command line?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The whois command talks in a specific protocol and port, namely
whois 43/tcp ; so obviously trying to use an HTTP(S) (HTTP port 80/tcp and HTTPS 443/tcp by default).
So HTTP proxies-aware won't work, as those protocols are not involved with the inner workings of the whois protocol.
If you need to setup an external proxy, you would need a socks aware proxy, as this example https://stackoverflow.com/questions/6718836/how-can-i-implement-a-simple-whois-proxy-in-perl
see also About the WHOIS Protocol
The WHOIS protocol is a simple, plaintext-based protocol that listens on TCP port 43. There is an RFC that defines the protocol, RFC 3912.