Excellent!!

I'll take a look at it. 

Sergei I Golod writes:

> Hello.
> Some day ago(approx. 1-1,5 month) I download the latest version of
> squidGuard: 2001-06-14.squidGuard-1.2.0.tar.gz
> And now I send large patch to this version. Patch include:
> 1. change format of the configuration file:
> old config to solve next task: only users in place1.users from ip
> 192.168.1.0/24 and users from place2.users and ip 192.168.2.0/24, i.e. users
> from place1.users can't use proxy if their ip is 192.168.2.0/24

> #
> # CONFIG FILE FOR SQUIDGUARD
> #

> dbhome /var/lib/squidguard
> logdir /var/log/squidguard

> #
> # SOURCE ADDRESSES:
> #

> source place1 {
>         ip            192.168.1.0/24
>         userlist    dest/place1.users
> }

> source place2 {
>         ip            192.168.2.0/24
>         userlist    dest/place2.users
> }

> destination denied {
>         expressionlist  dest/denied.regex
>         redirect        http://localhost/denied.html
>         logfile         denied.log
> }

> acl {
>         place1 {
>                 pass    !denied any
>         }

>         place2 {
>                 pass    !denied any
>         }

>         default {
>                 pass    none
>                 rewrite dmz
>                 redirect
> http://localhost/cgi-bin/blocked?clientaddr=%a&clientname=%n&clientident=%i&;
> srcclass=%s&ta
>         }
> }

> AND new config for this task:
> #
> # CONFIG FILE FOR SQUIDGUARD
> #

> dbhome /var/lib/squidguard
> logdir /var/log/squidguard

> #
> # SOURCE ADDRESSES:
> #

> source place {
>     from subplace1 {
>         ip            192.168.1.0/24
>         userlist    dest/place1.users
>         domains  somedomain.com
>     }
>     from subplace2 {
>         ip            192.168.2.0/24
>         userlist    dest/place2.users
>         domain   otherdomain.com
>     }
>     any  other "source" directives
> }

> destination denied {
>         expressionlist  dest/denied.regex
>         redirect        http://localhost/denied.html
>         logfile         denied.log
> }

> acl {
>         place {
>                 pass    !denied any
>         }

>         default {
>                 pass    none
>                 rewrite dmz
>                 redirect
> http://localhost/cgi-bin/blocked?clientaddr=%a&clientname=%n&clientident=%i&;
> srcclass=%s&ta
>         }
> }

> IT'S ALL! We don't need to define for each place1 and place2 group it's own
> source and acl defenition. Only define ONE source and ONE acl for groups
> place1 and place2.

> 2. I reformat all .c .h  .l and .y files with
> indent -kr -ts8 --line-length120 to make all sources more clean and
> readable.
> 3. Remove all superfluous files in src/: lex.yy.c.flex, main.c.leh,
> main.c.new, y.tab.c.bison, y.tab.h.bison. This files generated from sg.l and
> sg.y.
> 4. Any questions/suggestions are welcome ;)

> Sergei.


-- 
Lars Erik H�land        Telefon:  (+47) 9067 2988
ENKAROS AS              Telefaks: (+47) 6717 3901
www.enkaros.no          E-mail:   [EMAIL PROTECTED]

Reply via email to