Re: [squid-users] listening on more than one incoming port

From: Colin Campbell <sgcccdc@dont-contact.us>
Date: Tue, 12 Feb 2002 09:32:15 +1000 (EST)

Hi,

On Mon, 11 Feb 2002, Jason Jin wrote:

> IS it possible to have squid listen to more than
> one port,and selectively forwarding some request
> to remote host:port ?
>
> I've squid 2.3 ST4 that listen for incoming http request
> for port 8888, and forwarding
> the request to any remote host on port 80. This is fine.
>
> However,some of the remote server is listen on ,say port 8000.
> and subsequent request is redirected to remote:8000, resulting trying
> to by-passing my proxy.

Why do you say that? If the browser is configured to use your squid box as
its HTTP proxy, then *all* HTTP requests will go through your proxy,
regardless of the port the destination web server server is listening on.
That's how browsers work with proxies.

When a browser is not configured to use a proxy:

- a url like http://www.squid-cache.org/index.html would be handled as
  follows:

o browser connects to www.squid-cache.org on port 80
o browser says (something like) "GET /index.html HTTP/1.0"

- a url like http://www.squid-cache.org:8080/index.html would be handled
  as follows:

o browser connects to www.squid-cache.org on port 8080
o browser says (something like) "GET /index.html HTTP/1.0"

When a browser is configured to use a proxy (say on port 8888)

- a url like http://www.squid-cache.org/index.html would be handled as
  follows:

o browser connects to proxy on port 8888
o browser says "GET http://www.squid-cache.org/index.html HTTP/1.0"
o squid connects to www.squid-cache.org on port 80
o squid says "GET /index.html HTTP/1.0"

- a url like http://www.squid-cache.org:8080/faq would be handled as
  follows:

o o browser connects to proxy on port 8888
o browser says "GET http://www.squid-cache.org:8080/index.html HTTP/1.0"
o squid connects to www.squid-cache.org on port 8080
o squid says "GET /index.html HTTP/1.0"

So, the destination port has no bearing on whether squid handles the
request or not (acls notwithstanding).

Colin
Received on Mon Feb 11 2002 - 16:32:29 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:06:13 MST