[squid-users] Could we have variables in squid conf file ?

Matus UHLAR - fantomas uhlar at fantomas.sk
Tue Oct 1 16:09:43 UTC 2024


>On 2024-10-01 11:49, Dr.X wrote:
>>Just wondering if I can have in squid.conf like :
>>
>>export FRONTEND='1.2.3.4'
>>http_port {FRONTEND}:3128
>>
>>But the way above did not work and seems not recognized by squid .
>>
>>My question is , Is it possible that I identify a variable and give 
>>it a value like string , number and call it in another place in 
>>squid.conf file ?

On 01.10.24 12:06, Alex Rousskov wrote:
>No, squid.conf does not support such variables (yet?). Needless to 
>say, you can emulate that functionality using a custom preprocessor.

I used to define host names (available in /etc/hosts) for directives like 
this one.

I am not sure if http_port supports this but you should be able to check.

-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Fighting for peace is like fucking for virginity...


More information about the squid-users mailing list