TCPWatch is a simple Python program which has two operation modes:
- HTTP proxy
- Port forwarding
$ python tcpwatch.py -L 8000:linuxonly.nl:80Thus the request can be seen by using the URL http://localhost:8000/. However, as TCPWatch does not rewrite the Host header, this will not trigger the right virtual host.
Proxy mode
- Start TCPWatch, by running python tcpwatch.py -p 8080.
- Configure the client to use the proxy. Host localhost, port 8080.
- Do the request.
- In TCPWatch, click on the number in the left column.
- The request and response are shown in the right column.
Forwarding mode
- Start TCPWatch, by running python tcpwatch.py -L 8000:host.example.com:80, where host.example.com is the site to connect to and 8000 is the local port to listen on.
- Do the request, using the URL http://localhost:8000/.
- In TCPWatch, click on the number in the left column.
- The request and response are shown in the right column.