[squid-users] how to add default directive to squid

Amos Jeffries squid3 at treenet.co.nz
Thu Jul 28 11:03:11 UTC 2016


On 28/07/2016 8:27 p.m., --Ahmad-- wrote:
> Hi Developers .
> 
> i want to add like default directive to squid
> 
> as we know the default cache_mem is 256 M
> i want to add some config that will be default loaded to squid and don’t want to add it to squid.conf 
> 
> say i want to add directive like dns to be 127.0.0.1
> and i don’t want to put it myself in squid.conf

If that is your actual need, then simply not adding dns_nameservers
directive in squid.conf is the answer. The system DNS resolver settings
will be loadeed from /etc/resolv.conf *unless* you manually specify
values in squid.conf.


> i want squid to load it internally and replace it if i add the same direct in squid.conf 
> 

Then src/cf.data.pre is what you want. Look in there for "DEFAULT:" lines.

Your previous posts on this topic indicated that your purpose was to
*hide* some information from your users. As you were old back then, this
is the wrong way to go about it. For two very critical reasons:

1) default settings built into Squid can be viewed by anyone able to
access the machine simply by using "squid -k parse" with verbose or
debug flags.


2) Modified binaries are required to comply with the GPL version 2
license. If anyone requests to see the modified version of your source
code you are required to deliver it in sufficient form for them to be
able to build ther own binary identical to yours.

Amos



More information about the squid-users mailing list