View Single Post
Old 08-25-2008, 07:05 PM   #23
Ret
Connoisseur
Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.Ret has a complete set of Star Wars action figures.
 
Ret's Avatar
 
Posts: 81
Karma: 480
Join Date: Dec 2004
I think you don't really need my code but if you want it you can get it from here
That program runs a webserver listening on port 80. When it is run, it loads the HOSTS file in memory and adds some entries. It listens for requests and serves the files (sample.html should be named index.html). When you close it, it puts the HOSTS files back to original state.

That's not the approach used by Linreb since it doesn't run on port 80 (which needs some privileges).
What you really need is to add some code in Linreb to let it handle requests for domains other than ebooksystem.net and forward the responses back to the reader. In other words, always act as a proxy except when trying to connect to ETI servers.

If you don't want to add code to Linreb (maybe for maintenance reasons) you should run a separate proxy that directs all traffic to ebooksystem.net to Linreb's port. (I tried to do that but I could find a way to do a port redirection.)

One last thing: I think It'll be a lot of work parsing all the Uploaded book forum section and presenting them to the reader.
Ret is offline   Reply With Quote