[squid-users] clt_conn_tag and url_rewrite_program

Amos Jeffries squid3 at treenet.co.nz
Wed Nov 16 13:15:24 UTC 2016


On 17/11/2016 1:50 a.m., David Touzeau wrote:
> 
> 
> Hi, 
> 
> I have my own redirector and i want to play with the clt_conn_tag but i
> encounter some issues ( perhaps for misunderstanding )
> 
> url_rewrite_program /usr/share/artica-postfix/filter.py
> url_rewrite_children 10 startup=1 idle=1 concurrency=4
> url_rewrite_extras "%>a/%>A %un %>rm myip=%la myport=%lp mac=%>eui
> sni=%ssl::>sni referer=%{Referer}>h tag=%et"
> 
> My plugin answer to squid with 
> 
> ERR clt_conn_tag=123456\n
> Or
> OK status=302 url="http://blablabla.com" clt_conn_tag=123456\n
> 
> First question: clt_conn_tag=123456 in url_rewrite protocol is supported ?
> 

Yes it should be working.


> Second: i have instructed squid to send the %et value.
> Expected value returned should be 123456 but this not the case, squid sends
> "-" value.
> 
> Is tag=%et is the correct token of url_rewrite_extras to retrieve the
> clt_conn_tag value ?

No. %et is the 'tag=' returned from previous external ACL checks.

The logformat code for clt_conn_tag annotations is %note{clt_conn_tag}


Amos



More information about the squid-users mailing list