in reply to Transparent proxy / Intercepting proxy
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
Not really perl related, but this is probably just changing the dest port to 8080 on the remote host. You'd need to use --to localhost:8080 -- and if you want it to be truly transparent, you'd want to MASQUERADE the packets on the way back. For this kind of thing, use tcpdump/wireshark on all related hosts to see what's happening (it even works in windows!). This answer isn't complete, but this isn't perl info anyway.
As for HTTP::Proxy, I used it for some things back in 2004 and it's not exactly transparent. It crashes from time to time and in a way that's difficult to reproduce and bug report. I don't recall the particulars of that, but you may just see what I mean. On the other hand, that was 5 years ago, maybe others found it and fixed it.
-Paul
|
|---|