[squid-users] tcp_outgoing_address acl based on - incoming header Flag

Alex Rousskov rousskov at measurement-factory.com
Mon Jul 15 19:00:23 UTC 2019


On 7/15/19 10:33 AM, --Ahmad-- wrote:

> i want to ask how can i adapt external ip address in squid based on incoming requests .
> 
> say i have squid with ips :
> 1.1.1.1
> 2.2.2.2
> 3.3.3.3

> client will initiate a header called start with value = 1.1.1.1

> how can i let squid make tcp_outgoing_address with the value in the incoming header  ?

Have you tried using req_header ACLs to direct requests to their
corresponding outgoing addresses?

  acl requestsWithStartEqual1p1p1p1 req_header Start ^1[.]1[.]1[.]1$
  ...
  tcp_outgoing_address 1.1.1.1 requestsWithStartEqual1p1p1p1
  tcp_outgoing_address 2.2.2.2 requestsWithStartEqual2p2p2p2
  ...

Alex.


More information about the squid-users mailing list