[squid-users] select parent proxy based on ACL

Amos Jeffries squid3 at treenet.co.nz
Wed Apr 6 12:00:28 UTC 2016


On 6/04/2016 5:38 p.m., Pascal Watteel wrote:
> anyone?

NP: Messages sent at 12am should be expected to have some response
delay. (and its always 12am somewhere in the world :-).

> 
> On Tue, 2016-04-05 at 12:08 +0000, Pascal Watteel wrote:
>> Hi peeps,
>>
>> I have written a python based download accelerator based proxy.
>> It does exactly the same thing as what aria2c would do, but as a
>> proxy.

Huh?

aria2c is a "client" (or "user agent") in HTTP terminology.

A proxy is ... a proxy. Which is to say both client and server. But
definitely NOT a user-agent.

So either you have written a proxy, or you have written something like
aria2c. Not both.

"accelerator" is a marketing jargon word. Particularly when used in the
phrase "download acclerator".


>>
>> I now want to tell squid to only send .zip .iso .whatever to this
>> proxy
>> as an parent proxy.
>> But i only find a way how to tell squid to do this for domains with
>> peer_domain.
>>
>> Is there a way how i can tell squid to decide the parent proxy based
>> on
>> a ACL so i can just use regex define the files i wanna send to this
>> parent?
>>

Terminology clash again. Squid does not send files anywhere. Two reasons
for that:

1) HTTP is a "pull" protocol: Requests go out (aka "send"). Responses
come back (aka "receive"). That is all.

2) HTTP has therefore no protocol concept of "files". Squid is only
aware of the response content-type (note that its "payload" or
"content", not 'file') when it is already on its way back to the client.
Far too late to decide which server to send the request message to.


I *think* what you are asking for is:
 <http://www.squid-cache.org/Doc/config/cache_peer_access/>

But I am seriously doubting whether you have the right HTTP model with
all this malformed terminology you are using.

You can approximately guess what the traffic will be by urlpath_regex
matching the URL path values. But unless you control the servers URL
design that is just a rough guess.


PS. "download accelerator" is an old concept from the days 20-odd years
go when networks were slow and HTTP/1.0 was wasting bandwidth to make
things slower. As with all old concepts in HTTP Squid probably already
does it in one way or several.
In particular modern HTTP/1.1 plus Caching obsoletes almost all
"download accelerator" designs in a much more efficient way.
 If you describe what you actualy want the whole system to do in a clear
way we can perhapse provide you with squid.conf settings to avoid
needing the extra layer of custom proxy software.

Amos



More information about the squid-users mailing list