• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DNS Filter

 
Greenhorn
Posts: 24
Redhat Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
FilterTable.png
[Thumbnail for FilterTable.png]
FilterTable.txt
 
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24
Redhat Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic