[squid-users] Define and use a variable in squid.conf (Was: What happens when duplicate external_acl_type are mentioned)

Amish anon.amish at gmail.com
Mon Dec 3 04:56:00 UTC 2018



On 03/12/18 9:51 am, Alex Rousskov wrote:
>
>> May be atleast 'if' statement can have define variable support.
> The "I will just add this little thing in this little corner" is how we
> ended up with terrible syntax in the first place...

Current syntax isn't outright bad. Its decent enough.

Only reason its bit terrible is because backward compatibility is given 
a priority and attempt is made to NOT to break old squid.conf.

So adding a new or better config and better defaults is bit tough.

May be squid.conf should have versioning processor at top.

$ cat squid.conf
cfgversion 4.0
# new syntax follows

If no version is mentioned existing syntax is assumed.

This way we do not have to worry much about backward compatibility.

Ofcourse this is a different subject altogether so I will end here on this.

>> Because it already has similar support for ${process_number} etc.
> Yes, and preprocessor macros are supported throughout the configuration
> file, not just in if statements. However, they are preprocessor macros,
> not configuration variables. We can add support for custom preprocessor
> macros (in addition to the existing built-in ones), but, again, doing so
> correctly requires some serious work. Meanwhile, template substitutions
> are available as a local ready-to-use alternative.

Thanks a lot again for your inputs.

Regards

Amish.


More information about the squid-users mailing list