Re: [squid-users] how does squid work as a transparent proxy?

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Tue, 08 Jul 2008 02:41:24 +0200

On mån, 2008-07-07 at 19:46 -0400, Peter Djalaliev wrote:
> (e.g 3128). From what I understand, when iptables matches a packet
> against this rule, it overwrites the packet's destination IP address and
> TCP port with, respectively, the local IP address and 3128.
>
> How does Squid (e.g in the case of an HTTP request) know the IP address
> of the original web server that the packet was destined to?

iptables provides a getsockopt interface where one can query the
original destination address of the connetion associated with the
socket.

> If yes, does Squid do something similar in the case of other supported
> protocols - SSL, gopher?

No, Squid is an HTTP proxy, and only accepts HTTP requests. That HTTP
request may be for an gopher:// object, but it's still an HTTP request.
There is no gopher server component in Squid, only a gopher client to be
able to fetch gopher:// URLs when requested by it's HTTP clients.

Regards
Henrik

Received on Tue Jul 08 2008 - 00:41:35 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 08 2008 - 12:00:04 MDT