Teen Programmers Unite  
 

 

Return to forum top

Recomendations on building a proxy server?

Posted by MrHB [send private reply] at February 09, 2003, 02:53:50 PM

Hi all,

I'm an intermediate level c/c++ programmer looking to program a custom yet simple proxy server. My end goal is only that I want to be able to edit html documents coming in from a certain web server before they get displayed in my browser (the editing I can handle, intercepting the documents I don't know about). I have no experience in network programming, so I'm not sure of the best way to approach this. My current plan of attack is to write a proxy server, and Java seems to be the way to go. I could be wrong about that, since I'm not very familiar with Java, and, as I said, I havn't done any networking in c, but my initial research has led me to believe that I should give it a shot in Java.

The local network I want to implement this for connects to the internet through a Linux box running a gateway with ipchains. Is it reasonable to assume I should be able to make a proxy server to operate between my browser(s) and ipchains? Before I get too involved in this, can anybody tell me if I'm on the right track, or is there an obviously better route? I'm also willing to use other languages if they could provide a simple solution.

Thanks,

Sean

Posted by taubz [send private reply] at February 09, 2003, 03:32:12 PM

You're on the right track, and Java's network classes are very easy to use.

If you're going to accomplish this by setting proxy settings in your browser, then you'll need to implement the SOCKS 4 or 5 protocol, which I'm not familiar with.

- taubz

Posted by AnyoneEB [send private reply] at February 09, 2003, 03:39:08 PM

You might want to look at http://www.privoxy.org/ which is an open-source proxy server that uses regular expressions to edit HTML (you can make filters that affect only certain sites).

Posted by MrHB [send private reply] at February 09, 2003, 04:53:29 PM

Thanks much for privoxy link, I think it will function just fine for what I want - I'm basically adding a killfile-type filter for browsing a message board. Damn trolls.

Sean

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.