[squid-users] logformat for requests using PROXY protocol

Chammi Kumarapathirage chammidhan at gmail.com
Fri Nov 22 20:45:11 UTC 2019


Thanks for the response Amos. This is an AWS Fargate instance and I'm not
exactly sure how patching works in that space. I'm rather new to both
serverless concept and Squid. I will research this and get back to you.
Thanks!

On Friday, November 22, 2019, Amos Jeffries <squid3 at treenet.co.nz> wrote:

> 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 at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20191123/e7016fba/attachment.html>


More information about the squid-users mailing list