e2guardian: bump to 3.1.2

Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
This commit is contained in:
Marko Ratkaj
2015-05-20 15:36:30 +02:00
committed by Luka Perkov
parent 89f58c79a2
commit 52e66a21d4
4 changed files with 97 additions and 73 deletions
+11 -10
View File
@@ -8,18 +8,16 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=e2guardian PKG_NAME:=e2guardian
PKG_VERSION:=3.0.4 PKG_VERSION:=3.1.2
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org> PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian/archive/
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_MD5SUM:=85cfa16074737dbc3935f93dfcded285
PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian.git PKG_FIXUP:=autoreconf
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_INSTALL:=1
@@ -47,9 +45,12 @@ CONFIGURE_VARS += \
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--with-sysconfsubdir=e2guardian \ --with-sysconfsubdir=e2guardian \
--with-proxyuser=root \ --with-proxyuser=nobody \
--with-proxygroup=root \ --with-proxygroup=nogroup \
--enable-pcre=yes --enable-pcre=yes \
--with-piddir=/tmp/e2guardian/ \
--enable-sslextralists=no \
--enable-sslmitm=no
define Build/Configure define Build/Configure
$(call Build/Configure/Default,$CONFIGURE_ARGS) $(call Build/Configure/Default,$CONFIGURE_ARGS)
+2 -3
View File
@@ -1,13 +1,11 @@
config e2guardian 'e2guardian' config e2guardian 'e2guardian'
option config_file '/etc/e2guardian/e2guardianf1.conf'
option languagedir '/usr/share/e2guardian/languages' option languagedir '/usr/share/e2guardian/languages'
option language 'ukenglish' option language 'ukenglish'
option loglevel '2' option loglevel '2'
option logexceptionhits '2' option logexceptionhits '2'
option logfileformat '1' option logfileformat '1'
option loglocation '/dev/null' option loglocation '/var/log/e2guardian/access.log'
option maxuploadsize '-1' option maxuploadsize '-1'
option filterip ''
option filterports '8080' option filterports '8080'
option proxyip '127.0.0.1' option proxyip '127.0.0.1'
option proxyport '3128' option proxyport '3128'
@@ -45,6 +43,7 @@ config e2guardian 'e2guardian'
option deletedownloadedtempfiles 'on' option deletedownloadedtempfiles 'on'
option initialtrickledelay '20' option initialtrickledelay '20'
option trickledelay '10' option trickledelay '10'
option downloadmanager '/etc/e2guardian/downloadmanagers/fancy.conf'
option downloadmanager '/etc/e2guardian/downloadmanagers/default.conf' option downloadmanager '/etc/e2guardian/downloadmanagers/default.conf'
option contentscannertimeout '60' option contentscannertimeout '60'
option contentscanexceptions 'off' option contentscanexceptions 'off'
+26 -6
View File
@@ -7,13 +7,15 @@ STOP=10
USE_PROCD=1 USE_PROCD=1
PROG=/usr/sbin/e2guardian PROG=/usr/sbin/e2guardian
CONFIGFILE="/tmp/e2guardian/e2guardian.conf" CONFIGFILE="/tmp/e2guardian/e2guardian.conf"
LOGFILE="/tmp/e2guardian/access.log"
GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf"
validate_e2guardian_section() { validate_e2guardian_section() {
uci_validate_section e2guardian e2guardian "${1}" \ uci_validate_section e2guardian e2guardian "${1}" \
'config_file:string' \
'accessdeniedaddress:string' \ 'accessdeniedaddress:string' \
'bannediplist:string' \ 'bannediplist:string' \
'contentscanexceptions:string' \ 'contentscanexceptions:string' \
'contentscanner:string'
'contentscannertimeout:uinteger' \ 'contentscannertimeout:uinteger' \
'createlistcachefiles:string' \ 'createlistcachefiles:string' \
'custombannedflashfile:string' \ 'custombannedflashfile:string' \
@@ -83,7 +85,7 @@ validate_e2guardian_section() {
start_service() { start_service() {
local config_file accessdeniedaddress bannediplist contentscanexceptions contentscannertimeout \ local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \
createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \ createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \
downloadmanager exceptioniplist filecachedir loglocation \ downloadmanager exceptioniplist filecachedir loglocation \
filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \ filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \
@@ -102,10 +104,26 @@ start_service() {
} }
mkdir -p $(dirname $CONFIGFILE) mkdir -p $(dirname $CONFIGFILE)
ln -sf $config_file $(dirname $CONFIGFILE) chown -R nobody:nogroup $(dirname $CONFIGFILE)
mkdir -p $(dirname $loglocation)
chown -R nobody:nogroup $(dirname $loglocation)
touch $loglocation
chown nobody:nogroup $loglocation
ln -sf $loglocation $(dirname $LOGFILE)
ln -sf /etc/e2guardian/e2guardian.conf $CONFIGFILE
ln -sf /etc/e2guardian/e2guardianf1.conf $GROUPCONFIG
echo "accessdeniedaddress = " $accessdeniedaddress > $CONFIGFILE echo "accessdeniedaddress = " $accessdeniedaddress > $CONFIGFILE
echo "bannediplist = " $bannediplist >> $CONFIGFILE echo "bannediplist = " $bannediplist >> $CONFIGFILE
if [ "$contentscanner" != "" ]
then
echo "contentscanner = " $contentscanner >> $CONFIGFILE
fi
echo "contentscanexceptions = " $contentscanexceptions >> $CONFIGFILE echo "contentscanexceptions = " $contentscanexceptions >> $CONFIGFILE
echo "contentscannertimeout = " $contentscannertimeout >> $CONFIGFILE echo "contentscannertimeout = " $contentscannertimeout >> $CONFIGFILE
echo "createlistcachefiles = " $createlistcachefiles >> $CONFIGFILE echo "createlistcachefiles = " $createlistcachefiles >> $CONFIGFILE
@@ -174,15 +192,17 @@ start_service() {
echo "weightedphrasemode = " $weightedphrasemode >> $CONFIGFILE echo "weightedphrasemode = " $weightedphrasemode >> $CONFIGFILE
procd_open_instance procd_open_instance
procd_set_param command $PROG -N -c "$CONFIGFILE" procd_set_param command $PROG -c $CONFIGFILE
procd_set_param file $CONFIGFILE procd_set_param file $CONFIGFILE
procd_set_param respawn
procd_close_instance procd_close_instance
} }
stop_service() stop_service()
{ {
e2guardian -s | awk -F':' '{ print $2}' | xargs kill -9 PID=`cat /tmp/e2guardian/e2guardian.pid`
kill $PID
rm -f /tmp/e2guardian/e2guardian.pid
} }
service_triggers() service_triggers()
+58 -54
View File
@@ -1,4 +1,4 @@
# e2guardian filter group config file for version 3.0.4 # e2guardian filter group config file for version 3.1.2
# Filter group mode # Filter group mode
@@ -25,41 +25,41 @@ groupmode = 1
groupname = '' groupname = ''
# Content filtering files location # Content filtering files location
bannedphraselist = 'etc/e2guardian/lists/bannedphraselist' bannedphraselist = '/etc/e2guardian/lists/bannedphraselist'
weightedphraselist = 'etc/e2guardian/lists/weightedphraselist' weightedphraselist = '/etc/e2guardian/lists/weightedphraselist'
exceptionphraselist = 'etc/e2guardian/lists/exceptionphraselist' exceptionphraselist = '/etc/e2guardian/lists/exceptionphraselist'
bannedsitelist = 'etc/e2guardian/lists/bannedsitelist' bannedsitelist = '/etc/e2guardian/lists/bannedsitelist'
greysitelist = 'etc/e2guardian/lists/greysitelist' greysitelist = '/etc/e2guardian/lists/greysitelist'
bannedsslsitelist = 'etc/e2guardian/lists/bannedsslsitelist' bannedsslsitelist = '/etc/e2guardian/lists/bannedsslsitelist'
greysslsitelist = 'etc/e2guardian/lists/greysslsitelist' greysslsitelist = '/etc/e2guardian/lists/greysslsitelist'
exceptionsitelist = 'etc/e2guardian/lists/exceptionsitelist' exceptionsitelist = '/etc/e2guardian/lists/exceptionsitelist'
bannedurllist = 'etc/e2guardian/lists/bannedurllist' bannedurllist = '/etc/e2guardian/lists/bannedurllist'
greyurllist = 'etc/e2guardian/lists/greyurllist' greyurllist = '/etc/e2guardian/lists/greyurllist'
exceptionurllist = 'etc/e2guardian/lists/exceptionurllist' exceptionurllist = '/etc/e2guardian/lists/exceptionurllist'
exceptionregexpurllist = 'etc/e2guardian/lists/exceptionregexpurllist' exceptionregexpurllist = '/etc/e2guardian/lists/exceptionregexpurllist'
bannedregexpurllist = 'etc/e2guardian/lists/bannedregexpurllist' bannedregexpurllist = '/etc/e2guardian/lists/bannedregexpurllist'
picsfile = 'etc/e2guardian/lists/pics' picsfile = '/etc/e2guardian/lists/pics'
contentregexplist = 'etc/e2guardian/lists/contentregexplist' contentregexplist = '/etc/e2guardian/lists/contentregexplist'
urlregexplist = 'etc/e2guardian/lists/urlregexplist' urlregexplist = '/etc/e2guardian/lists/urlregexplist'
refererexceptionsitelist = 'etc/e2guardian/lists/refererexceptionsitelist' refererexceptionsitelist = '/etc/e2guardian/lists/refererexceptionsitelist'
refererexceptionurllist = 'etc/e2guardian/lists/refererexceptionurllist' refererexceptionurllist = '/etc/e2guardian/lists/refererexceptionurllist'
embededreferersitelist = 'etc/e2guardian/lists/embededreferersitelist' embededreferersitelist = '/etc/e2guardian/lists/embededreferersitelist'
embededrefererurllist = 'etc/e2guardian/lists/embededrefererurllist' embededrefererurllist = '/etc/e2guardian/lists/embededrefererurllist'
urlredirectregexplist = 'etc/e2guardian/lists/urlredirectregexplist' urlredirectregexplist = '/etc/e2guardian/lists/urlredirectregexplist'
# local versions of lists (where LOCAL_LISTS enabled) # local versions of lists (where LOCAL_LISTS enabled)
#localbannedsitelist = 'etc/e2guardian/lists/localbannedsitelist' #localbannedsitelist = '/etc/e2guardian/lists/localbannedsitelist'
#localgreysitelist = 'etc/e2guardian/lists/localgreysitelist' #localgreysitelist = '/etc/e2guardian/lists/localgreysitelist'
#localexceptionsitelist = 'etc/e2guardian/lists/localexceptionsitelist' #localexceptionsitelist = '/etc/e2guardian/lists/localexceptionsitelist'
#localbannedurllist = 'etc/e2guardian/lists/localbannedurllist' #localbannedurllist = '/etc/e2guardian/lists/localbannedurllist'
#localgreyurllist = 'etc/e2guardian/lists/localgreyurllist' #localgreyurllist = '/etc/e2guardian/lists/localgreyurllist'
#localexceptionurllist = 'etc/e2guardian/lists/localexceptionurllist' #localexceptionurllist = '/etc/e2guardian/lists/localexceptionurllist'
#localbannedsslsitelist = 'etc/e2guardian/lists/localbannedsslsitelist' #localbannedsslsitelist = '/etc/e2guardian/lists/localbannedsslsitelist'
#localgreysslsitelist = 'etc/e2guardian/lists/localgreysslsitelist' #localgreysslsitelist = '/etc/e2guardian/lists/localgreysslsitelist'
#localbannedsearchlist = 'etc/e2guardian/lists/localbannedsearchlist' #localbannedsearchlist = '/etc/e2guardian/lists/localbannedsearchlist'
!! Not compiled !! authexceptionsitelist = 'etc/e2guardian/lists/authexceptionsitelist' !! Not compiled !! authexceptionsitelist = '/etc/e2guardian/lists/authexceptionsitelist'
!! Not compiled !! authexceptionurllist = 'etc/e2guardian/lists/authexceptionurllist' !! Not compiled !! authexceptionurllist = '/etc/e2guardian/lists/authexceptionurllist'
# Filetype filtering # Filetype filtering
# #
@@ -78,20 +78,20 @@ urlredirectregexplist = 'etc/e2guardian/lists/urlredirectregexplist'
# (on | off) # (on | off)
# #
blockdownloads = off blockdownloads = off
exceptionextensionlist = 'etc/e2guardian/lists/exceptionextensionlist' exceptionextensionlist = '/etc/e2guardian/lists/exceptionextensionlist'
exceptionmimetypelist = 'etc/e2guardian/lists/exceptionmimetypelist' exceptionmimetypelist = '/etc/e2guardian/lists/exceptionmimetypelist'
# #
# Use the following lists to block specific kinds of file downloads. # Use the following lists to block specific kinds of file downloads.
# The two exception lists above can be used to override these. # The two exception lists above can be used to override these.
# #
bannedextensionlist = 'etc/e2guardian/lists/bannedextensionlist' bannedextensionlist = '/etc/e2guardian/lists/bannedextensionlist'
bannedmimetypelist = 'etc/e2guardian/lists/bannedmimetypelist' bannedmimetypelist = '/etc/e2guardian/lists/bannedmimetypelist'
# #
# In either file filtering mode, the following list can be used to override # In either file filtering mode, the following list can be used to override
# MIME type & extension blocks for particular domains & URLs (trusted download sites). # MIME type & extension blocks for particular domains & URLs (trusted download sites).
# #
exceptionfilesitelist = 'etc/e2guardian/lists/exceptionfilesitelist' exceptionfilesitelist = '/etc/e2guardian/lists/exceptionfilesitelist'
exceptionfileurllist = 'etc/e2guardian/lists/exceptionfileurllist' exceptionfileurllist = '/etc/e2guardian/lists/exceptionfileurllist'
# POST protection (web upload and forms) # POST protection (web upload and forms)
# does not block forms without any file upload, i.e. this is just for # does not block forms without any file upload, i.e. this is just for
@@ -108,9 +108,9 @@ maxuploadsize = -1
# Supply categorised lists here and the category string shall be logged against # Supply categorised lists here and the category string shall be logged against
# matching requests, but matching these lists does not perform any filtering # matching requests, but matching these lists does not perform any filtering
# action. # action.
#logsitelist = 'etc/e2guardian/lists/logsitelist' #logsitelist = '/etc/e2guardian/lists/logsitelist'
#logurllist = 'etc/e2guardian/lists/logurllist' #logurllist = '/etc/e2guardian/lists/logurllist'
#logregexpurllist = 'etc/e2guardian/lists/logregexpurllist' #logregexpurllist = '/etc/e2guardian/lists/logregexpurllist'
# Outgoing HTTP header rules: # Outgoing HTTP header rules:
# Optional lists for blocking based on, and modification of, outgoing HTTP # Optional lists for blocking based on, and modification of, outgoing HTTP
@@ -121,9 +121,9 @@ maxuploadsize = -1
# Headers are matched/replaced on a line-by-line basis, not as a contiguous # Headers are matched/replaced on a line-by-line basis, not as a contiguous
# block. # block.
# Use for example, to remove cookies or prevent certain user-agents. # Use for example, to remove cookies or prevent certain user-agents.
headerregexplist = 'etc/e2guardian/lists/headerregexplist' headerregexplist = '/etc/e2guardian/lists/headerregexplist'
bannedregexpheaderlist = 'etc/e2guardian/lists/bannedregexpheaderlist' bannedregexpheaderlist = '/etc/e2guardian/lists/bannedregexpheaderlist'
addheaderregexplist = 'etc/e2guardian/lists/addheaderregexplist' addheaderregexplist = '/etc/e2guardian/lists/addheaderregexplist'
# Weighted phrase mode # Weighted phrase mode
# Optional; overrides the weightedphrasemode option in e2guardian.conf # Optional; overrides the weightedphrasemode option in e2guardian.conf
@@ -166,11 +166,11 @@ naughtynesslimit = 50
# List of regular expressions for matching search engine URLs. It is assumed # List of regular expressions for matching search engine URLs. It is assumed
# that the search terms themselves will be contained in the # that the search terms themselves will be contained in the
# of output of each expression. # of output of each expression.
#searchregexplist = 'etc/e2guardian/lists/searchregexplist' #searchregexplist = '/etc/e2guardian/lists/searchregexplist'
# #
# Banned Search Term list(s) for option 1 # Banned Search Term list(s) for option 1
#bannedsearchlist = 'etc/e2guardian/lists/bannedsearchlist' #bannedsearchlist = '/etc/e2guardian/lists/bannedsearchlist'
#bannedsearchoveridelist = 'etc/e2guardian/lists/bannedsearchoveridelist' #bannedsearchoveridelist = '/etc/e2guardian/lists/bannedsearchoveridelist'
# Search term limit (for Option 2) # Search term limit (for Option 2)
@@ -192,9 +192,9 @@ naughtynesslimit = 50
# of text. # of text.
# Please note that all or none of the below should be uncommented, not a # Please note that all or none of the below should be uncommented, not a
# mixture. # mixture.
#bannedsearchtermlist = 'etc/e2guardian/lists/bannedsearchtermlist' #bannedsearchtermlist = '/etc/e2guardian/lists/bannedsearchtermlist'
#weightedsearchtermlist = 'etc/e2guardian/lists/weightedsearchtermlist' #weightedsearchtermlist = '/etc/e2guardian/lists/weightedsearchtermlist'
#exceptionsearchtermlist = 'etc/e2guardian/lists/exceptionsearchtermlist' #exceptionsearchtermlist = '/etc/e2guardian/lists/exceptionsearchtermlist'
# Category display threshold # Category display threshold
# This option only applies to pages blocked by weighted phrase filtering. # This option only applies to pages blocked by weighted phrase filtering.
@@ -330,12 +330,12 @@ reportinglevel = 3
# only used in reporting level 3. # only used in reporting level 3.
# #
# The default template file path is <languagedir>/<language>/template.h # The default template file path is <languagedir>/<language>/template.h
# e.g. share/e2guardian/languages/ukenglish/template.html when using 'ukenglish' # e.g. /share/e2guardian/languages/ukenglish/template.html when using 'ukenglish'
# language. # language.
# #
# This option generates a file path of the form: # This option generates a file path of the form:
# <languagedir>/<language>/<htmltemplate> # <languagedir>/<language>/<htmltemplate>
# e.g. share/e2guardian/languages/ukenglish/custom.html # e.g. /share/e2guardian/languages/ukenglish/custom.html
# #
#htmltemplate = 'custom.html' #htmltemplate = 'custom.html'
@@ -420,7 +420,11 @@ reportinglevel = 3
sslcertcheck = off sslcertcheck = off
#SSL man in the middle #SSL man in the middle
# Forge ssl certificates for all sites, decrypt the data then re encrypt it # Forge ssl certificates for all non-exception sites, decrypt the data then re encrypt it
# using a different private key. Used to filter ssl sites # using a different private key. Used to filter ssl sites
sslmitm = off sslmitm = off
#Limit SSL MITM to sites in greysslsitelist(s)
# ignored if sslmitm is off
# SSL sites not matching greysslsitelist will be treat as if sslmitm is off.
onlymitmsslgrey = off