I\'m trying to forward all traffic from port 6999 to port 7000 (I know I could use iptables, but the idea is to use Node.js to do some packet inspection).
Here is th
Have you looked at the Node.js module Hoxy?
http://www.youtube.com/watch?v=2YLfBTrVgZU
Quick description from the developer's README:
Hoxy is a web-hacking proxy for node.js, intended for use by web developers. Using hoxy, you can act as a "man in the middle" and alter HTTP requests and responses as they flow through, based on a set of conditional rules. As a running process, hoxy otherwise behaves like a standalone proxy server. Hoxy was inspired as a way to complement debuggers like Firebug, which let you manipulate the client runtime but not the underlying HTTP conversation.
This should work pretty well unless you're looking for a lower level, packet to packet inspection of the data.