Search squid archive

Re: logformat for requests using PROXY protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/11/19 4:05 pm, Chammi Kumarapathirage wrote:
> I have my logformat as follows.
> logformat jsonformat {"Client Hostname":"%>A","Source IP":"%>a","HTTP
> Method":"%rm","HTTP Protocol version":"%rv","Request
> Domain":"%>rd","Port":"%>rP","User Agent":"%{User-Agent}>h","Request
> Size":"%>st","Reply Size":"%<st","Response Time(ms)":"%tr","Status
> Code":"%>Hs","Request Status":"%Ss","Server FQDN":"%<A"} 
> 
> The proxy is sitting behind a load balancer in AWS and Proxy Protocol V2
> is enabled on both the LB and Squid. Everything seems to work fine. I
> can create rules based on source IP of the client. However. I want to be
> able to  create rules based on the hostname of the original client. But
> it doesn't seem that Squid sees the original client's hostname. Rather
> it takes the hostname of the LB as seen by below log.

The %>A log code is still tied to old logging state instead of the IP
values updated by PROXY protocol.

The only way I can see to log that value without patching Squid is with
something complicated like an external_acl_type helper to do the lookup
and supply it as a tag or note to Squid.

If you are happy to patch I can make a PR for you to try.


Amos
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux