[squid-users] Possible to user reply_header_add directive with acl random access list ?

Amos Jeffries squid3 at treenet.co.nz
Fri Jul 19 10:04:50 UTC 2019


On 19/07/19 6:49 pm, --Ahmad-- wrote:

> 
> But may be im wrong with config and im open now to any suggestions to
> change the config to get it working as i mentioned above with headers .
> 

As I said at the end of my earlier mail:

"
You appear to have missed the fact that each
check/test of the ACL uses a different randomly selected number.
"


These:

>
>  reply_header_add start "a" !markedProcessed half10000 markProcessed
>
>  tcp_outgoing_address 12.13.200.10 half10000
>

... contain two different check/test of the ACL called half10000.

One for reply_header_add, another one for tcp_outgoing_address.

-> a random 1/5 of requests will have "Start: a" header added.

-> a random 1/5 of requests will try to send from 12.13.200.10 IP address.

The two sets likely do not overlap. Though since this is truly random -
there is a 2.5% chance that any request might *look* like what you are
seeking.


To make the IP based on the "a" existence you have to ... base it on the
"a" - not on some random number.


Amos


More information about the squid-users mailing list