Delphi & Indy 10 Whois over Web Proxy

Good day,

Please help with an example of how to use idWHOIS via a web proxy?
I want to make whois calls anonymously using free web proxies.

Why is it so simple with idHTTP component that have ProxyParams but with idWHOIS not?

I am really clueless :)

See my attempted code snipped:


procedure TForm2.Button2Click(Sender: TObject);
var
  ProxyHTTP :TIdConnectThroughHttpProxy;
  Proxy :TIdCustomTransparentProxy;
begin
  ProxyHTTP := TIdConnectThroughHttpProxy.Create(Self);
  Proxy := TIdCustomTransparentProxy.Create(Self);
  Try

{    idIOHandler.TransparentProxy := Proxy;

    Proxy.Host := 'whois.ausregistry.net.au';
    Proxy.Port := StrToInt('43');
    Proxy.IPVersion := ID_DEFAULT_IP_VERSION;
//    Proxy.Connect(idIOHandler, edtProxy.Text, StrToInt(edtPort.Text), ID_DEFAULT_IP_VERSION);
//    Proxy.Enabled;

    Proxy.ChainedProxy := ProxyHTTP;
 }

    idIOHandler.TransparentProxy := ProxyHTTP;
    ProxyHTTP.Host := edtProxy.Text;
    ProxyHTTP.Port :=  StrToInt(edtPort.Text);
    ProxyHTTP.IPVersion := ID_DEFAULT_IP_VERSION;
    ProxyHTTP.OnStatus := ProxyHTTPOnStatus;
    ProxyHTTP.Enabled;
    ProxyHTTP.Connect(idIOHandler, edtProxy.Text, StrToInt(edtPort.Text), ID_DEFAULT_IP_VERSION);

    Memo1.Clear;
    Memo1.Update;
    Memo1.Lines.Text := idWhois.WhoIs(edtDomain.Text + '.com.au');
  Finally
    idIOHandler.Close;
    idWhois.Disconnect;
    Proxy.Free;
    ProxyHTTP := TIdConnectThroughHttpProxy.Create(Self);
  End;
end;

Open in new window

Marius0188Asked:
Who is Participating?
 
Marius0188Author Commented:
Apparently you can not make whois queries via a web proxy server.
Is that correct?

Only a socks server and they are very scarce.
0
 
ThommyConnect With a Mentor Commented:
Have a look at this earlier EE question, especially smackadoo's comment concerning whois servers blocking proxy server ips...
connect to Whois server via proxy and proxy chaining
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.