summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* authdb: implement basicsTimo Teräs2010-08-278-83/+420
| | | | | | | | | Implement a shared memory based authentication cache. It's a simple local cache indexed by IP-address, and keeps track of that IP's auth info such as username, allowed categories and timeouts. This provides basis for captive portal, per-user definable category restrictions and implementation of soft blocks (block which can be overridden by user by clicking a button on the blocked page).
* auth: rename to squark-auth-snmpTimo Teräs2010-08-223-2/+2
| | | | | Will implement 'captive portal' style authentication with separate DB later.
* db: rename squarkdb to filterdbTimo Teräs2010-08-225-5/+5
| | | | will need authentication db later too.
* squark: add missing #include and define _GNU_SOURCETimo Teräs2010-08-202-1/+2
|
* filter: do not modify deniedurl cgi parameterTimo Teräs2010-08-193-40/+44
| | | | | | | Keep the modifications (which are needed for key lookup) inside the lookup routine. This includes e.g. lower casing the URL. This way can pass the exact original request string to our block page script. This also changes the way 'www123.' is stripped from the request.
* auth: experimental (untested) support for port reauthenticationTimo Teräs2010-08-191-12/+53
| | | | | | Ability to force reauthentication (HP ProCurve specific) for the switch port to which we traced the IP. This works currently only with the HP WebAuth scheme (should be possible with MAC auth scheme too).
* filter: url encoding of block script parametersTimo Teräs2010-08-193-5/+110
| | | | and pass the denied url too.
* filter: properly filter ipv4 address form urlsTimo Teräs2010-08-193-34/+65
| | | | properly match them against db data.
* db, filter: fix db generation of ipv4 style addressesTimo Teräs2010-08-183-18/+46
| | | | | Properly embed the ipv4 address in database now. Teach filter to understand the two new reserved component id's.
* blob: definite null blob inlineTimo Teräs2010-08-182-3/+1
| | | | | Should be faster in most cases to write two null words than to copy them around.
* filter: improve dns part matchingTimo Teräs2010-08-181-21/+105
| | | | | Lower case the dns part of url. Also skip "www123" and similar entries when determining if path components should be matched.
* filter: squid interfacing code, basic minimum configurationTimo Teräs2010-08-143-29/+175
| | | | | | | | | | Implement squid redirect protocol. It implements the "concurrent" version even though the algorithm is non-blocking. Doing this can reduce the amount of read system calls on busy system. Minimum command line based configuration for banning specific categories and specifying the redirect site. Will probably have to add some sort of config file system later.
* filter: fix db building issues and implement path component matchingTimo Teräs2010-08-134-15/+110
| | | | | | | | Fixes has sub domains/paths hints to be correct. www<number> as first domain entry matching now checks it won't remove second level domain names. And the filter code now looksup path components from the db.
* db: smarter string pointer encoding (include length field)Timo Teräs2010-08-134-12/+38
| | | | | | So we don't need explicit null terminator in most cases saving space. It will also speed up comparisons as getting string blob is now constant time (no strlen needed).
* filter: implement basic analysis of urlsTimo Teräs2010-08-115-8/+250
| | | | | Analysing of the url host part, some simple tests. Not usable as squid filter yet.
* sqdb-build: write out category sectionTimo Teräs2010-08-112-4/+51
| | | | store the names of categories to database
* squarkdb: use stdint.h defined typedefsTimo Teräs2010-08-102-14/+15
| | | | u_int32_t is not standard, use uint32_t from stdint.h instead.
* blob: use uppercase for macroes, add some functionalityTimo Teräs2010-08-103-64/+135
| | | | Normalizing macro names to upper case and extending functionality.
* squark: split generic blob code to it's own fileTimo Teräs2010-08-104-141/+166
| | | | it's useful in other binaries than squark-auth too.
* squarkdb: cmph based url database for squark filteringTimo Teräs2010-08-095-6/+789
| | | | | | | | | Implement basics of squarkdb which will be used by squark-filter to categorize URIs. Implementation is based on libcmph and uses file format suitable to be mmap:ed from squark-filter. Lua code is used to create the squark database from standard domain / url blacklists.
* auth: read net-snmp configuration filesTimo Teräs2010-07-282-6/+12
| | | | | | This allows setting SNMPv3 configuration via the standard config files. If SNMP community is given from command line, we fallback to SNMPv2c mode.
* auth: add manual page, and minor code changesTimo Teräs2010-07-232-2/+77
| | | | basics of the helper module explained.
* squark-auth: initial commitTimo Teräs2010-07-222-0/+1253
Basic functionality implemented.