User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

perl:sqm [2020-02-15 00:57] (current)
Line 1: Line 1:
 +
 +=====Squid account ​ and quota manager=====
 +
 +Or SQM for short.
 +
 +I made it application from [[maacom:​start|Maacom]],​ with some specific logiс changes (access log scanner, password exporter, etc).
 +
 +The application include sqm-helper, autentification helpler for Squid. ​
 +
 +Used time for programming:​ total about 8-9 hours, too many time was checking in real work.
 +
 +====Installation====
 +
 +Order of installation and start is the same as [[maacom:​start|Maacom]].
 +The application ready for use.
 +
 +Source now here [[https://​github.com/​sadsoldier/​sqm]] \\
 +The release a **beta** but work good.
 +
 +{{:​perl:​screenshot-2017-12-18-08-40-15.png?​480}}
 +
 +====UML object diagramm==== ​
 +
 +   * Source {{ :​perl:​sqm.dia }}
 +
 +{{:​perl:​sqm.png?​680}}
 +
 +====Sqm config example====
 +
 +<code ini sqm.conf>​
 +#
 +# $Id$
 +#
 +loglevel = debug
 +dbname = /​var/​db/​sqm/​sqm.db
 +
 +user = squid
 +group = squid
 +
 +# -- for postgresql --
 +#dbname = sqm
 +#dbhost = 127.0.0.1
 +#dblogin = sqm
 +#dbpassword = password
 +#dbengine = postgres
 +
 +#EOF
 +</​code>​
 +
 +===And install procedure for the example===
 +
 +<​code>​
 +# ./configure --prefix=/​usr/​local
 +# make install
 +# mkdir -p /​var/​db/​sqm/​
 +# sqlite3 /​var/​db/​sqm/​sqm.db <​usr/​local/​share/​sqm/​schema.sql
 +# chown -Rv squid:squid /var/*/sqm
 +# service sqm start
 +</​code>​
 +
 +Where squid:squid is user squid system user and group. You can use another ids.
 +  ​
 +
 +====Squid config example ====
 +
 +<code text squid.conf>​
 +auth_param basic program /​usr/​local/​sbin/​sqm-helper
 +auth_param basic children 5
 +auth_param basic realm WEB PROXY SERVER
 +auth_param basic credentialsttl 2 hours
 +auth_param basic casesensitive off
 +</​code>​
 +
 +For checing squid auth helper you can start sqm-helper in command line
 +
 +<​code>​
 +# sqm-helper
 +good_login good_password
 +OK
 +some_bad_login bad_password
 +ERR
 +^C
 +#
 +</​code>​
 +
 +----
 +[<>]
 +
 +
 +