Discussion:
[squid-users] how to use squid as a tcp forward proxy?
phafer
2016-04-05 07:50:51 UTC
Permalink
hi,


how can I extend squid to process/modify payload of my private application protocol basing on TCP?
Client->squid->my squid plugin which is used to process/modify payload of tcp traffic->Server


BR,
Bin
Alex Rousskov
2016-04-05 21:05:57 UTC
Permalink
Post by phafer
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.
Post by phafer
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:
http://wiki.squid-cache.org/SquidFaq/ContentAdaptation


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


HTH,

Alex.

Continue reading on narkive:
Loading...