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;