Search squid archive

Re: Start page for Squid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Dear all,
>
> I am looking for a way of redirecting my users to a "start page" when
> they first start their browser through my transparent squid proxy. I
> have found one (old) example on the web that explains that one could use
> a perl script as this:
>
> #!/usr/bin/perl
> $|=1;
> my %logged_in;
>
> while(<>) {
>   if (!defined($logged_in{$_})) {
>     $logged_in{$_} = 1;
>     print "ERR\n";
>   } else {
>     print "OK\n";
>   }
> }
>
> So I put this in a file called sessions in /usr/local/bin and give it
> execution possibilities.
>
> Further, the example explains that squid.conf should have something
> similar:
>
> external_acl_type session ...
> acl session external session
>
> So I add:
>
> external_acl_type session /usr/local/bin/session
> acl session external session
>
> But it needs a FORMAT but I am not sure which...so I add %LOGIN.
>
> Further more the following needs to be added:
>
> http_access deny !session
> deny_info http://some_url/ session
>
> But it doesn't work and I am not redirected. Could someone please direct
> me?
>
> Thanks in advance!
>
> best regards,
> Joakim Lagerqvist
>

FORMAT is a list of the details you want passed to the helper.
I have a helper that does a similar job for me to what you are trying to
setup. The config for that is:

external_acl_type prepay_test ttl=0 negative_ttl=0 %SRC %DST
/etc/squid3/squid-check-users.sh
acl prepaid_users external prepay_test
deny_info http://wifi.treenet.co.nz/ prepaid_users
http_access deny localnet !prepaid_users
http_access allow localnet prepaid_users


Amos



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux