?
Solved

Delphi & Indy 10 Whois over Web Proxy

Posted on 2012-08-23
3
Medium Priority
?
1,296 Views
Last Modified: 2013-04-03
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

0
Comment
Question by:Marius0188
3 Comments
 
LVL 28

Accepted Solution

by:
Sinisa Vuk earned 750 total points
ID: 38324772
0
 

Author Comment

by:Marius0188
ID: 38340482
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
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 750 total points
ID: 38362469
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question