File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes DNS Filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "DNS Filter" Watch "DNS Filter" New topic
Author

DNS Filter

Song Guo
Greenhorn

Joined: Apr 24, 2011
Posts: 24

Now I need a program which I call it DNS filter program,and I have a file called FilterTable.txt(Attachments).The functions of the program are as follows.I open an Internet exporer,if I keyin "www.hit.edu.cn"(its ip is 219.217.227.180),the program will search FilterTable and access google'DNS 8.8.4.4 to parse the site.But if I keyin "www.baidu.com",the program will search TilterTable.txt and return "cannot access!".
How can I write the program using java? Vvvvvvvvvvvvvvery thank you!



[Thumbnail for FilterTable.png]

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
You're talking about an HTTP proxy. Instead of wring it from scratch, why not use an existing one? There used to be one called "Muffin", although it's probably outdated now. But a web search will find others. Any particular reason it needs to be written in Java?
Song Guo
Greenhorn

Joined: Apr 24, 2011
Posts: 24

Thank you for your answer.Its my homework that I will post it to my teacher.Muffin is comlex.I want to an very simple one.Could you help me?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Well, if it's homework then you should be doing it in the first place. What do you have so far, and where are you stuck making progress?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

You said you were writing a program, but then you started talking about what Internet Explorer should do. I don't understand how those two things are related.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DNS Filter