tags:

views:

162

answers:

2

Hi everyone, I'm trying to implement a Web Anonymizer (like ktunnel) in java, but I really could not get the idea, I need some information about how a web anonymizer works. I really do not need the source or a sample application, just the idea or a tutorial explaining the anonymizer idea. Thanks.

A: 

I don't know ktunnel, but for basic information about anonymity networks have a look at Tor at wikipedia.

tangens
Tor is impressive, but a bit complicated for this question. As I read the question, it only asks about basic *principles* of anonymizers, not all the ins and outs of a mature system.
BobMcGee
You're absolutely right BobMcGee, I will only display the content of a web page, and re-write some html tags like "a" or "img"
fsonmezay
+2  A: 

A basic anonymizer just acts as an encrypted proxy, creating an encrypted "tunnel" between a proxy server and a client, where all traffic from the client goes through the proxy. This accomplishes 3 things:

  1. The client cannot* be determined by looking at traffic between the proxy and endpoint. Hosts on the other end just see the proxy server.
  2. The content of a client's traffic is hidden from monitoring, because the connection to the proxy is encrypted.
  3. It is impossible* to determine the endpoint for traffic originating from the client, because all of it appears to go to the proxy only.

*In reality, a simple anonymizer doesn't provide full protection, because if you look at the amount of traffic between client and proxy, and the traffic between proxy and various sites, you can associate a specific client with their traffic. This is called traffic analysis.

Fancier anonymizers, such as Tor, provide protection against traffic analysis and a lot of other techniques to break anonymity, BUT that's really beyond the scope of the question.

From your point of view, all that matters is writing the proxy software. Your program should be able to create and manage encrypted connections to clients. This means it needs to be able to (securely) initiate an encrypted connection to a host, pass on connections to external hosts, and then pass traffic back and forth. Basically, it needs to act as a router.

There are protocols in place for how to accomplish this -- I suggest you read up on the SOCKS protocol, or Tor. Your best bet if this is a learning project is to write basic SOCKS proxy software. If this is for actual use, there should be libraries in Java that provide the necessary services.

EdiT: Ktunnel is a less fancy proxy -- it uses a CGI script to redirect information from a URL back and forth. Basically, you enter an address, it fetches the page for that address, and sends it to you. Fairly simple, actually.

BobMcGee