question in :src/cf.data.pre "

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

question in :src/cf.data.pre "

--Ahmad--
Hello folks .
wanna ask if possible to add  some directives to be by default added to the squid config file and when the squid run after compilation to take effect even i don’t add them to squid .conf

id there a way to add them one shot in that file ?
src/cf.data.pre ??


i had a look and found like a formula like default value , name , doc stat , doc end … etc


thanks

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

Amos Jeffries
Administrator
On 13/12/17 02:52, --Ahmad-- wrote:
> Hello folks .
> wanna ask if possible to add  some directives to be by default added to the squid config file and when the squid run after compilation to take effect even i don’t add them to squid .conf
>

Directives to do what?

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

--Ahmad--
as an example i want directives to be added automatically without adding them to squid.conf

look below :

acl ip1 myip 1.2.3.4
http_access allow ip1
http_port 6532

so above i want them to be added to squid.conf without add them there

so i run squid in terminal it will contact default squid.conf which has no config

but it will have the config above added automatically

make sense ?



cheers

> On Dec 12, 2017, at 4:06 PM, Amos Jeffries <[hidden email]> wrote:
>
> On 13/12/17 02:52, --Ahmad-- wrote:
>> Hello folks .
>> wanna ask if possible to add  some directives to be by default added to the squid config file and when the squid run after compilation to take effect even i don’t add them to squid .conf
>
> Directives to do what?
>
> Amos
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

Antony Stone
In reply to this post by --Ahmad--
On Tuesday 12 December 2017 at 14:52:08, --Ahmad-- wrote:

> Hello folks .
> wanna ask if possible to add  some directives to be by default added to the
> squid config file and when the squid run after compilation to take effect
> even i don’t add them to squid .conf

http://lists.squid-cache.org/pipermail/squid-users/2016-July/011732.html

Was there anything about the reply you got then which doesn't answer your
current question?


Antony.

--
"640 kilobytes (of RAM) should be enough for anybody."

 - Bill Gates

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

Amos Jeffries
Administrator
In reply to this post by --Ahmad--
On 13/12/17 03:31, --Ahmad-- wrote:

> as an example i want directives to be added automatically without adding them to squid.conf
>
> look below :
>
> acl ip1 myip 1.2.3.4
> http_access allow ip1
> http_port 6532
>
> so above i want them to be added to squid.conf without add them there
>
> so i run squid in terminal it will contact default squid.conf which has no config
>
> but it will have the config above added automatically
>
> make sense ?
>

Sort of. See should be able to see how to add fixed default values for
those directives are already being defined for how to add fixed values.

Your problem will be that the default config is loaded *before* Squid
starts receiving traffic. The myip value is very dynamic and changes or
only identifiable *after* Squid is fully running. It can even change
between TCP connections arriving if the machines NIC assignments change.


Since your values are fixed at compile time and cannot be changed
dynamically you may do better to have a squid.conf with those settings
that gets loaded always and uses the include directive to load any other
user configurable content.

Have a look at the way I'm doing separation between Squid packages
config and admin config for Debian Squid-4 packages:
 
<https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pkg-squid/pkg-squid.git;a=commitdiff;h=3a068f640abdc87df8a767e8625289534c81ea69>
 
<https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=pkg-squid/pkg-squid.git;a=commitdiff;h=586d19bb0ad644c6599407696a7a137af1575f93>


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

--Ahmad--
In reply to this post by --Ahmad--
you correct .

but I’m asking about something different like non config in the file :



acl ip1 myip 1.2.3.4
http_access allow ip1
http_port 6532





i know the pre.cc file has some config 

but i want to add something different 

thanks 
On Dec 12, 2017, at 4:31 PM, --Ahmad-- <[hidden email]> wrote:

acl ip1 myip 1.2.3.4
http_access allow ip1
http_port 6532


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

--Ahmad--
In reply to this post by --Ahmad--
@amos about your question .

i think “include option “ is ok , but i also need it to be hidden and not added to squid.conf 

say like :

include /var/test.cc

would like this is loaded automatically and don’t need to add it in squid.conf ???


i mean each time i run squid it will load like include other file .

i tried to add into pre file below config :

NAME: include
TYPE: string
LOC: Config.include
DEFAULT: /var/test.cc
DOC_START
    Hello
DOC_END


i guess it will load the line built in squid.conf like ==> include /var/test.cc

and then i can add what i like into the file ==>  /var/test.cc


but i got fail during compilation process .

may be my point above help ?





On Dec 12, 2017, at 4:31 PM, --Ahmad-- <[hidden email]> wrote:

acl ip1 myip 1.2.3.4
http_access allow ip1
http_port 6532


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

Antony Stone
On Tuesday 12 December 2017 at 16:12:59, --Ahmad-- wrote:

> @amos about your question .
>
> i think “include option “ is ok , but i also need it to be hidden and not
> added to squid.conf

Who are you trying to hide this from?

Antony.

--
In Heaven, the beer is Belgian, the chefs are Italian, the supermarkets are
British, the mechanics are German, the lovers are French, the entertainment is
American, and everything is organised by the Swiss.

In Hell, the beer is American, the chefs are British, the supermarkets are
German, the mechanics are French, the lovers are Swiss, the entertainment is
Belgian, and everything is organised by the Italians.

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

--Ahmad--
In reply to this post by --Ahmad--
@antony 

i will wait amos reply  !

thanks for your time 

cheers 

On Dec 12, 2017, at 5:12 PM, --Ahmad-- <[hidden email]> wrote:

@amos about your question .

i think “include option “ is ok , but i also need it to be hidden and not added to squid.conf 

say like :

include /var/test.cc

would like this is loaded automatically and don’t need to add it in squid.conf ???


i mean each time i run squid it will load like include other file .

i tried to add into pre file below config :

NAME: include
TYPE: string
LOC: Config.include
DEFAULT: /var/test.cc
DOC_START
    Hello
DOC_END


i guess it will load the line built in squid.conf like ==> include /var/test.cc

and then i can add what i like into the file ==>  /var/test.cc


but i got fail during compilation process .

may be my point above help ?





On Dec 12, 2017, at 4:31 PM, --Ahmad-- <[hidden email]> wrote:

acl ip1 myip 1.2.3.4
http_access allow ip1
http_port 6532

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

Amos Jeffries
Administrator
In reply to this post by --Ahmad--
On 13/12/17 04:12, --Ahmad-- wrote:

> @amos about your question .
>
> i think “include option “ is ok , but i also need it to be hidden and
> not added to squid.conf
>
> say like :
>
> include /var/test.cc
>
> would like this is loaded automatically and don’t need to add it in
> squid.conf ???
>
>
> i mean each time i run squid it will load like include other file .
>
> i tried to add into pre file below config :
>
> NAME: include
> TYPE: string
> LOC: Config.include
> DEFAULT: /var/test.cc <http://test.cc>
> DOC_START
>      Hello
> DOC_END
>

Not like this. "include" is a hard-coded behaviour, not a normal
directive. It needs to be used like the Debian patch does, with
"squid.conf" file being the pre-determined settings and users in control
of the other stuff pulled in by 'include' from somewhere else.


OR, you just use the -f command line option to point at your custom
config file when you run Squid "from terminal".


I wasn't going to bother asking for a fourth time, but since Anthony did
"who are you trying to hide this from?" is still unanswered. Anyone who
might see these settings in the config file can also find them by other
means (ie looking at the machines open ports). So the lengths you are
going to hide them is very weird.


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

--Ahmad--
ok great point amos .
is there a way to change the default config squid file for squid ?

i mean i want to change the default location  from /etc/squid/squid.conf to something else
?

can i change that from code cc before compile ?


cheers


> On Dec 12, 2017, at 6:42 PM, Amos Jeffries <[hidden email]> wrote:
>
> On 13/12/17 04:12, --Ahmad-- wrote:
>> @amos about your question .
>> i think “include option “ is ok , but i also need it to be hidden and not added to squid.conf
>> say like :
>> include /var/test.cc
>> would like this is loaded automatically and don’t need to add it in squid.conf ???
>> i mean each time i run squid it will load like include other file .
>> i tried to add into pre file below config :
>> NAME: include
>> TYPE: string
>> LOC: Config.include
>> DEFAULT: /var/test.cc <http://test.cc>
>> DOC_START
>>     Hello
>> DOC_END
>
> Not like this. "include" is a hard-coded behaviour, not a normal directive. It needs to be used like the Debian patch does, with "squid.conf" file being the pre-determined settings and users in control of the other stuff pulled in by 'include' from somewhere else.
>
>
> OR, you just use the -f command line option to point at your custom config file when you run Squid "from terminal".
>
>
> I wasn't going to bother asking for a fourth time, but since Anthony did "who are you trying to hide this from?" is still unanswered. Anyone who might see these settings in the config file can also find them by other means (ie looking at the machines open ports). So the lengths you are going to hide them is very weird.
>
>
> Amos

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: question in :src/cf.data.pre "

Matus UHLAR - fantomas
On 13.12.17 12:13, --Ahmad-- wrote:
>ok great point amos .
>is there a way to change the default config squid file for squid ?
>
>i mean i want to change the default location  from /etc/squid/squid.conf to something else
>?
>
>can i change that from code cc before compile ?

https://wiki.squid-cache.org/SquidFaq/CompilingSquid

you can define --sysconfdir at compile time.

--
Matus UHLAR - fantomas, [hidden email] ; 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.
Emacs is a complicated operating system without good text editor.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users