summaryrefslogtreecommitdiffstats
path: root/squark-filter.c
Commit message (Collapse)AuthorAgeFilesLines
* squark: reorganize sources to src directoryTimo Teräs2010-11-071-431/+0
|
* authdb: use configuration file to decide blocked categoriesTimo Teräs2010-09-141-51/+8
| | | | and cache the information to authdb properly.
* authdb: separate last access / login timeTimo Teräs2010-09-071-2/+2
| | | | and tweak the authdb a bit.
* filter: do not do auto-login, fix url parsing without hostnameTimo Teräs2010-09-071-7/+2
| | | | | | | do not have filter process to do auto login. this is required since squid might have stale login info in cache, and we should not honor it. need to fix auth-snmp to record logins in authdb too (should do that anyway to store the additional snmp information in authdb).
* auth-ip: implement logoutTimo Teräs2010-09-031-2/+2
| | | | Implement logout function and some minor fixes.
* auth-ip: introduce helper tool for authdb managementTimo Teräs2010-09-011-4/+5
| | | | fix also some authdb bugs, and make it actually usable.
* authdb: implement basicsTimo Teräs2010-08-271-15/+52
| | | | | | | | | 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).
* db: rename squarkdb to filterdbTimo Teräs2010-08-221-1/+1
| | | | will need authentication db later too.
* filter: do not modify deniedurl cgi parameterTimo Teräs2010-08-191-36/+25
| | | | | | | 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.
* filter: url encoding of block script parametersTimo Teräs2010-08-191-2/+4
| | | | and pass the denied url too.
* filter: properly filter ipv4 address form urlsTimo Teräs2010-08-191-34/+45
| | | | properly match them against db data.
* db, filter: fix db generation of ipv4 style addressesTimo Teräs2010-08-181-10/+17
| | | | | Properly embed the ipv4 address in database now. Teach filter to understand the two new reserved component id's.
* 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-141-28/+155
| | | | | | | | | | 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-131-7/+32
| | | | | | | | 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-131-5/+3
| | | | | | 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-111-0/+198
Analysing of the url host part, some simple tests. Not usable as squid filter yet.