Why http_proxy Does Not Necessarily Affect Whois
Distinguish traditional Whois TCP queries from HTTP-based registration-data clients when selecting a proxy route.
Traditional Whois uses its own TCP protocol, commonly on port 43. It is not an HTTP request just because the answer describes an internet domain.
An http_proxy variable only helps software that reads it for a supported HTTP proxy path. A Whois implementation can ignore that variable while making its normal TCP connection.
If a particular client supports SOCKS, configure that documented feature. A compatible TCP wrapper is another possibility, subject to the wrapper's interception limits and the proxy's destination-port policy. Do not assume every program called whois has the same features. If that client supports SOCKS and public intermediaries are permitted, the SOCKS proxy list offers candidates to check for access to the actual Whois servers and ports, including referrals.
HTTP-based registration-data services, including RDAP, use a different application protocol and can have an HTTP-aware client's proxy support. Switching interfaces is a deliberate change of tool and response format, not proof that the original Whois query was HTTP all along.
Keep referral behavior in view too: a lookup may contact more than one server. One permitted connection does not prove every later destination can use the intended route.