[squid-users] Sorry if this has been asked but I can't find an answer anywhere ...

Grant Taylor gtaylor at tnetconsulting.net
Mon Sep 27 20:36:56 UTC 2021


On 9/27/21 7:32 AM, Mike Yates wrote:
> Let me ask this then ....
> 
> I just want squid to redirect any requests (http for instance) to 
> a specific external url so for instance http://mysuidserver:80 to 
> http://externalserver:80 ...

What does "redirect" mean in this context?

Is it an HTTP 301 / 302 / 307 / 308 redirect?

Is it a JavaScript window.location.href change?

Is it some sort of game with TCP connections?

Is it an HTTP proxy that receives requests to one name and proxies 
requests to another name?

"redirect" is vague and difficult to answer.  All of the above, and 
more, options have significantly different solutions.  What's more is 
that each has their own requirements.

> Does that help ....

Unfortunately not much.

> I'm just sure what is the minimal conf file I would need to achieve 
> this ...

You need to better define what you are wanting to do.

As stated in another message, I suspect, but do not know for sure, that 
you want Squid to HTTP proxy requests for one name to be sent to a 
different name.

The kicker is that Squid can do this (at least) a couple of different ways;
1)  Simply initiate TCP connections to the new name and assume that the 
new server knows how to deal with the old name, because the queries will 
still be using the old name.
2)  Intercept the connections to the old name and initiate queries for 
the new name at the new destination.

TLS has implications on both of these methods and serious complications.

I strongly suspect what you want to do can be done.  But you still 
haven't told us enough about how things happen on a protocol level to 
provide a useful answer.

The best that I can give at the moment is the following, as I think it's 
integral to what I think you are wanting to do.

Link - Reverse Proxy Mode
  - https://wiki.squid-cache.org/SquidFaq/ReverseProxy



-- 
Grant. . . .
unix || die

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4013 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20210927/e78a6883/attachment-0001.bin>


More information about the squid-users mailing list