[squid-users] how to use squid as a tcp forward proxy?

Alex Rousskov rousskov at measurement-factory.com
Tue Apr 5 21:05:57 UTC 2016

On 04/05/2016 01:50 AM, phafer wrote:

> how can I extend squid to process/modify payload of my private
> application protocol basing on TCP?

You probably should not -- Squid is not designed to be a TCP proxy and
there ought to be better/true TCP proxies out there.

> Client->squid->my squid plugin which is used to process/modify payload
> of tcp traffic->Server

If you insist on modifying Squid, you can try to do what Native FTP code
in Squid does today:

1. Accept traffic from FTP clients at ftp_port.
2. Convert FTP traffic into fake HTTP messages.
3. General Squid code, including eCAP/ICAP, handles those HTTP messages.
4. Convert fake HTTP messages back into FTP traffic sent to FTP servers.

Doing so requires lots of complicated development, but should give you
what you want at the end. Standard eCAP/ICAP "plugin" interfaces can
then be used for message adaptation:

Again, most likely, Squid is the wrong solution for your problem.



More information about the squid-users mailing list