views:

239

answers:

2

I really appreciate if someone could give me an idea how to implement this. Also, is it possible to have a common implementation for most of the popular Linux desktop distros, if not all of them. Thanks.

What I need to implement is something like a Windows service, which runs automatically every time the OS boots. What it does is to intercept all HTTP requests made from browsers and record the request url. Hope it's clear now.

+5  A: 

Set up a transparent proxy.

Ignacio Vazquez-Abrams
+1. I think this will work better for you than the solutions in Kaleb's answer which are more like development tools rather than long running services.
Noufal Ibrahim
Thanks. Looks like this is the right answer for me.Two concerns:1. How much impact does it have on the performance of user desktop? 2. Will this work for all the popular Linux desktop distros?
Tong Wang
It will cause a short delay as the proxy processes (you don't need to use squid; any program that can act as an HTTP proxy will work), but it will work on all Linux distros from about the past... 4 years or so.
Ignacio Vazquez-Abrams
On further reading of the doc, it turned out that for a transparent proxy to work, you may need recompile the kernel and set up squid, which unfortunately can't happen in my case. Is there another way of intercepting http request without recompiling kernel and/or set up a 3rd party software?
Tong Wang
All kernels short of a badly-mutilated Gentoo or scratch kernel have the necessary support already compiled in. And you don't need to use squid; any app that can act as a HTTP proxy, even one you write yourself, will work.
Ignacio Vazquez-Abrams
The best way is not to put it on the desktops, but to put it in the path to the network. That way it'll work for *anything* that uses HTTP in the network, regardless of OS, and it can't be tinkered with locally.
Andrew McGregor
+3  A: 

I have a few favorites depending on what I'm trying to accomplish. They are:

  1. tcpflow - It's perfect for commandline output to console when you just need a quick idea of what's going on.
  2. tcpdump - When I'm on a box that doesn't have X windows running, I just output to a file and then can use a GUI program to view the output file.
  3. wireshark - a full-blown GUI that allows you to do almost anything you want with your output.
Kaleb Pederson