ソースを参照

e2guardian: bump to 3.1.2

Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
Marko Ratkaj 9 年 前
コミット
52e66a21d4
共有4 個のファイルを変更した98 個の追加74 個の削除を含む
  1. 11
    10
      net/e2guardian/Makefile
  2. 2
    3
      net/e2guardian/files/e2guardian.config
  3. 26
    6
      net/e2guardian/files/e2guardian.init
  4. 59
    55
      net/e2guardian/files/e2guardianf1.conf

+ 11
- 10
net/e2guardian/Makefile ファイルの表示

@@ -8,18 +8,16 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=e2guardian
11
-PKG_VERSION:=3.0.4
11
+PKG_VERSION:=3.1.2
12 12
 PKG_RELEASE:=1
13 13
 
14 14
 PKG_LICENSE:=GPL-2.0
15 15
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
16 16
 
17
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
18
-PKG_SOURCE_PROTO:=git
19
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20
-PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian.git
21
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
22
-
17
+PKG_SOURCE:=v$(PKG_VERSION).tar.gz
18
+PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian/archive/
19
+PKG_MD5SUM:=85cfa16074737dbc3935f93dfcded285
20
+PKG_FIXUP:=autoreconf
23 21
 PKG_BUILD_PARALLEL:=1
24 22
 PKG_INSTALL:=1
25 23
 
@@ -47,9 +45,12 @@ CONFIGURE_VARS += \
47 45
 
48 46
 CONFIGURE_ARGS += \
49 47
 		--with-sysconfsubdir=e2guardian \
50
-		--with-proxyuser=root \
51
-		--with-proxygroup=root \
52
-		--enable-pcre=yes
48
+		--with-proxyuser=nobody \
49
+		--with-proxygroup=nogroup \
50
+		--enable-pcre=yes \
51
+		--with-piddir=/tmp/e2guardian/ \
52
+		--enable-sslextralists=no \
53
+		--enable-sslmitm=no
53 54
 
54 55
 define Build/Configure
55 56
 	$(call Build/Configure/Default,$CONFIGURE_ARGS)

+ 2
- 3
net/e2guardian/files/e2guardian.config ファイルの表示

@@ -1,13 +1,11 @@
1 1
 config e2guardian 'e2guardian'
2
-	option config_file '/etc/e2guardian/e2guardianf1.conf'
3 2
 	option languagedir '/usr/share/e2guardian/languages'
4 3
 	option language 'ukenglish'
5 4
 	option loglevel '2'
6 5
 	option logexceptionhits '2'
7 6
 	option logfileformat '1'
8
-	option loglocation '/dev/null'
7
+	option loglocation '/var/log/e2guardian/access.log'
9 8
 	option maxuploadsize '-1'
10
-	option filterip ''
11 9
 	option filterports '8080'
12 10
 	option proxyip '127.0.0.1'
13 11
 	option proxyport '3128'
@@ -45,6 +43,7 @@ config e2guardian 'e2guardian'
45 43
 	option deletedownloadedtempfiles 'on'
46 44
 	option initialtrickledelay '20'
47 45
 	option trickledelay '10'
46
+	option downloadmanager '/etc/e2guardian/downloadmanagers/fancy.conf'
48 47
 	option downloadmanager '/etc/e2guardian/downloadmanagers/default.conf'
49 48
 	option contentscannertimeout '60'
50 49
 	option contentscanexceptions 'off'

+ 26
- 6
net/e2guardian/files/e2guardian.init ファイルの表示

@@ -7,13 +7,15 @@ STOP=10
7 7
 USE_PROCD=1
8 8
 PROG=/usr/sbin/e2guardian
9 9
 CONFIGFILE="/tmp/e2guardian/e2guardian.conf"
10
+LOGFILE="/tmp/e2guardian/access.log"
11
+GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf"
10 12
 
11 13
 validate_e2guardian_section() {
12 14
 	uci_validate_section e2guardian e2guardian "${1}" \
13
-		'config_file:string' \
14 15
 		'accessdeniedaddress:string' \
15 16
 		'bannediplist:string' \
16 17
 		'contentscanexceptions:string' \
18
+		'contentscanner:string'
17 19
 		'contentscannertimeout:uinteger' \
18 20
 		'createlistcachefiles:string' \
19 21
 		'custombannedflashfile:string' \
@@ -83,7 +85,7 @@ validate_e2guardian_section() {
83 85
 
84 86
 start_service() {
85 87
 
86
-	local config_file accessdeniedaddress bannediplist contentscanexceptions contentscannertimeout \
88
+	local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \
87 89
 		createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \
88 90
 		downloadmanager exceptioniplist filecachedir loglocation \
89 91
 		filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \
@@ -102,10 +104,26 @@ start_service() {
102 104
 	}
103 105
 
104 106
 	mkdir -p $(dirname $CONFIGFILE)
105
-	ln -sf $config_file $(dirname $CONFIGFILE)
107
+	chown -R nobody:nogroup $(dirname $CONFIGFILE)
108
+
109
+	mkdir -p $(dirname $loglocation)
110
+	chown -R nobody:nogroup $(dirname $loglocation)
111
+
112
+	touch $loglocation
113
+	chown nobody:nogroup $loglocation
114
+
115
+	ln -sf $loglocation $(dirname $LOGFILE)
116
+	ln -sf /etc/e2guardian/e2guardian.conf $CONFIGFILE
117
+	ln -sf /etc/e2guardian/e2guardianf1.conf $GROUPCONFIG
106 118
 
107 119
 	echo "accessdeniedaddress = " $accessdeniedaddress > $CONFIGFILE
108 120
 	echo "bannediplist = " $bannediplist >> $CONFIGFILE
121
+
122
+	if [  "$contentscanner" != ""  ]
123
+	then
124
+		echo "contentscanner = " $contentscanner >> $CONFIGFILE
125
+	fi
126
+
109 127
 	echo "contentscanexceptions = " $contentscanexceptions >> $CONFIGFILE
110 128
 	echo "contentscannertimeout = " $contentscannertimeout >> $CONFIGFILE
111 129
 	echo "createlistcachefiles = " $createlistcachefiles >> $CONFIGFILE
@@ -174,15 +192,17 @@ start_service() {
174 192
 	echo "weightedphrasemode = " $weightedphrasemode >> $CONFIGFILE
175 193
 
176 194
 	procd_open_instance
177
-	procd_set_param command $PROG -N -c "$CONFIGFILE"
195
+	procd_set_param command $PROG -c $CONFIGFILE
178 196
 	procd_set_param file $CONFIGFILE
179
-	procd_set_param respawn
180 197
 	procd_close_instance
198
+
181 199
 }
182 200
 
183 201
 stop_service()
184 202
 {
185
-	e2guardian -s | awk -F':' '{ print $2}' | xargs kill -9
203
+	PID=`cat /tmp/e2guardian/e2guardian.pid`
204
+	kill $PID
205
+	rm -f /tmp/e2guardian/e2guardian.pid
186 206
 }
187 207
 
188 208
 service_triggers()

+ 59
- 55
net/e2guardian/files/e2guardianf1.conf ファイルの表示

@@ -1,4 +1,4 @@
1
-# e2guardian filter group config file for version 3.0.4
1
+# e2guardian filter group config file for version 3.1.2
2 2
 
3 3
 
4 4
 # Filter group mode
@@ -25,41 +25,41 @@ groupmode = 1
25 25
 groupname = ''
26 26
 
27 27
 # Content filtering files location
28
-bannedphraselist = 'etc/e2guardian/lists/bannedphraselist'
29
-weightedphraselist = 'etc/e2guardian/lists/weightedphraselist'
30
-exceptionphraselist = 'etc/e2guardian/lists/exceptionphraselist'
31
-bannedsitelist = 'etc/e2guardian/lists/bannedsitelist'
32
-greysitelist = 'etc/e2guardian/lists/greysitelist'
33
-bannedsslsitelist = 'etc/e2guardian/lists/bannedsslsitelist'
34
-greysslsitelist = 'etc/e2guardian/lists/greysslsitelist'
35
-exceptionsitelist = 'etc/e2guardian/lists/exceptionsitelist'
36
-bannedurllist = 'etc/e2guardian/lists/bannedurllist'
37
-greyurllist = 'etc/e2guardian/lists/greyurllist'
38
-exceptionurllist = 'etc/e2guardian/lists/exceptionurllist'
39
-exceptionregexpurllist = 'etc/e2guardian/lists/exceptionregexpurllist'
40
-bannedregexpurllist = 'etc/e2guardian/lists/bannedregexpurllist'
41
-picsfile = 'etc/e2guardian/lists/pics'
42
-contentregexplist = 'etc/e2guardian/lists/contentregexplist'
43
-urlregexplist = 'etc/e2guardian/lists/urlregexplist'
44
-refererexceptionsitelist = 'etc/e2guardian/lists/refererexceptionsitelist'
45
-refererexceptionurllist = 'etc/e2guardian/lists/refererexceptionurllist'
46
-embededreferersitelist = 'etc/e2guardian/lists/embededreferersitelist'
47
-embededrefererurllist = 'etc/e2guardian/lists/embededrefererurllist'
48
-urlredirectregexplist = 'etc/e2guardian/lists/urlredirectregexplist'
28
+bannedphraselist = '/etc/e2guardian/lists/bannedphraselist'
29
+weightedphraselist = '/etc/e2guardian/lists/weightedphraselist'
30
+exceptionphraselist = '/etc/e2guardian/lists/exceptionphraselist'
31
+bannedsitelist = '/etc/e2guardian/lists/bannedsitelist'
32
+greysitelist = '/etc/e2guardian/lists/greysitelist'
33
+bannedsslsitelist = '/etc/e2guardian/lists/bannedsslsitelist'
34
+greysslsitelist = '/etc/e2guardian/lists/greysslsitelist'
35
+exceptionsitelist = '/etc/e2guardian/lists/exceptionsitelist'
36
+bannedurllist = '/etc/e2guardian/lists/bannedurllist'
37
+greyurllist = '/etc/e2guardian/lists/greyurllist'
38
+exceptionurllist = '/etc/e2guardian/lists/exceptionurllist'
39
+exceptionregexpurllist = '/etc/e2guardian/lists/exceptionregexpurllist'
40
+bannedregexpurllist = '/etc/e2guardian/lists/bannedregexpurllist'
41
+picsfile = '/etc/e2guardian/lists/pics'
42
+contentregexplist = '/etc/e2guardian/lists/contentregexplist'
43
+urlregexplist = '/etc/e2guardian/lists/urlregexplist'
44
+refererexceptionsitelist = '/etc/e2guardian/lists/refererexceptionsitelist'
45
+refererexceptionurllist = '/etc/e2guardian/lists/refererexceptionurllist'
46
+embededreferersitelist = '/etc/e2guardian/lists/embededreferersitelist'
47
+embededrefererurllist = '/etc/e2guardian/lists/embededrefererurllist'
48
+urlredirectregexplist = '/etc/e2guardian/lists/urlredirectregexplist'
49 49
 
50 50
 # local versions of lists (where LOCAL_LISTS enabled)
51
-#localbannedsitelist = 'etc/e2guardian/lists/localbannedsitelist'
52
-#localgreysitelist = 'etc/e2guardian/lists/localgreysitelist'
53
-#localexceptionsitelist = 'etc/e2guardian/lists/localexceptionsitelist'
54
-#localbannedurllist = 'etc/e2guardian/lists/localbannedurllist'
55
-#localgreyurllist = 'etc/e2guardian/lists/localgreyurllist'
56
-#localexceptionurllist = 'etc/e2guardian/lists/localexceptionurllist'
57
-#localbannedsslsitelist = 'etc/e2guardian/lists/localbannedsslsitelist'
58
-#localgreysslsitelist = 'etc/e2guardian/lists/localgreysslsitelist'
59
-#localbannedsearchlist = 'etc/e2guardian/lists/localbannedsearchlist'
60
-
61
-!! Not compiled !! authexceptionsitelist = 'etc/e2guardian/lists/authexceptionsitelist'
62
-!! Not compiled !! authexceptionurllist = 'etc/e2guardian/lists/authexceptionurllist'
51
+#localbannedsitelist = '/etc/e2guardian/lists/localbannedsitelist'
52
+#localgreysitelist = '/etc/e2guardian/lists/localgreysitelist'
53
+#localexceptionsitelist = '/etc/e2guardian/lists/localexceptionsitelist'
54
+#localbannedurllist = '/etc/e2guardian/lists/localbannedurllist'
55
+#localgreyurllist = '/etc/e2guardian/lists/localgreyurllist'
56
+#localexceptionurllist = '/etc/e2guardian/lists/localexceptionurllist'
57
+#localbannedsslsitelist = '/etc/e2guardian/lists/localbannedsslsitelist'
58
+#localgreysslsitelist = '/etc/e2guardian/lists/localgreysslsitelist'
59
+#localbannedsearchlist = '/etc/e2guardian/lists/localbannedsearchlist'
60
+
61
+!! Not compiled !! authexceptionsitelist = '/etc/e2guardian/lists/authexceptionsitelist'
62
+!! Not compiled !! authexceptionurllist = '/etc/e2guardian/lists/authexceptionurllist'
63 63
 
64 64
 # Filetype filtering
65 65
 #
@@ -78,20 +78,20 @@ urlredirectregexplist = 'etc/e2guardian/lists/urlredirectregexplist'
78 78
 # (on | off)
79 79
 #
80 80
 blockdownloads = off
81
-exceptionextensionlist = 'etc/e2guardian/lists/exceptionextensionlist'
82
-exceptionmimetypelist = 'etc/e2guardian/lists/exceptionmimetypelist'
81
+exceptionextensionlist = '/etc/e2guardian/lists/exceptionextensionlist'
82
+exceptionmimetypelist = '/etc/e2guardian/lists/exceptionmimetypelist'
83 83
 #
84 84
 # Use the following lists to block specific kinds of file downloads.
85 85
 # The two exception lists above can be used to override these.
86 86
 #
87
-bannedextensionlist = 'etc/e2guardian/lists/bannedextensionlist'
88
-bannedmimetypelist = 'etc/e2guardian/lists/bannedmimetypelist'
87
+bannedextensionlist = '/etc/e2guardian/lists/bannedextensionlist'
88
+bannedmimetypelist = '/etc/e2guardian/lists/bannedmimetypelist'
89 89
 #
90 90
 # In either file filtering mode, the following list can be used to override
91 91
 # MIME type & extension blocks for particular domains & URLs (trusted download sites).
92 92
 #
93
-exceptionfilesitelist = 'etc/e2guardian/lists/exceptionfilesitelist'
94
-exceptionfileurllist = 'etc/e2guardian/lists/exceptionfileurllist'
93
+exceptionfilesitelist = '/etc/e2guardian/lists/exceptionfilesitelist'
94
+exceptionfileurllist = '/etc/e2guardian/lists/exceptionfileurllist'
95 95
 
96 96
 # POST protection (web upload and forms)
97 97
 # does not block forms without any file upload, i.e. this is just for
@@ -108,9 +108,9 @@ maxuploadsize = -1
108 108
 # Supply categorised lists here and the category string shall be logged against
109 109
 # matching requests, but matching these lists does not perform any filtering
110 110
 # action.
111
-#logsitelist = 'etc/e2guardian/lists/logsitelist'
112
-#logurllist = 'etc/e2guardian/lists/logurllist'
113
-#logregexpurllist = 'etc/e2guardian/lists/logregexpurllist'
111
+#logsitelist = '/etc/e2guardian/lists/logsitelist'
112
+#logurllist = '/etc/e2guardian/lists/logurllist'
113
+#logregexpurllist = '/etc/e2guardian/lists/logregexpurllist'
114 114
 
115 115
 # Outgoing HTTP header rules:
116 116
 # Optional lists for blocking based on, and modification of, outgoing HTTP
@@ -121,9 +121,9 @@ maxuploadsize = -1
121 121
 # Headers are matched/replaced on a line-by-line basis, not as a contiguous
122 122
 # block.
123 123
 # Use for example, to remove cookies or prevent certain user-agents.
124
-headerregexplist = 'etc/e2guardian/lists/headerregexplist'
125
-bannedregexpheaderlist = 'etc/e2guardian/lists/bannedregexpheaderlist'
126
-addheaderregexplist = 'etc/e2guardian/lists/addheaderregexplist'
124
+headerregexplist = '/etc/e2guardian/lists/headerregexplist'
125
+bannedregexpheaderlist = '/etc/e2guardian/lists/bannedregexpheaderlist'
126
+addheaderregexplist = '/etc/e2guardian/lists/addheaderregexplist'
127 127
 
128 128
 # Weighted phrase mode
129 129
 # Optional; overrides the weightedphrasemode option in e2guardian.conf
@@ -166,11 +166,11 @@ naughtynesslimit = 50
166 166
 # List of regular expressions for matching search engine URLs.  It is assumed
167 167
 # that the search terms themselves will be contained in the
168 168
 # of output of each expression.
169
-#searchregexplist = 'etc/e2guardian/lists/searchregexplist'
169
+#searchregexplist = '/etc/e2guardian/lists/searchregexplist'
170 170
 #
171 171
 # Banned Search Term list(s) for option 1
172
-#bannedsearchlist = 'etc/e2guardian/lists/bannedsearchlist'
173
-#bannedsearchoveridelist = 'etc/e2guardian/lists/bannedsearchoveridelist'
172
+#bannedsearchlist = '/etc/e2guardian/lists/bannedsearchlist'
173
+#bannedsearchoveridelist = '/etc/e2guardian/lists/bannedsearchoveridelist'
174 174
 
175 175
 
176 176
 # Search term limit (for Option 2)
@@ -192,9 +192,9 @@ naughtynesslimit = 50
192 192
 # of text.
193 193
 # Please note that all or none of the below should be uncommented, not a
194 194
 # mixture.
195
-#bannedsearchtermlist = 'etc/e2guardian/lists/bannedsearchtermlist'
196
-#weightedsearchtermlist = 'etc/e2guardian/lists/weightedsearchtermlist'
197
-#exceptionsearchtermlist = 'etc/e2guardian/lists/exceptionsearchtermlist'
195
+#bannedsearchtermlist = '/etc/e2guardian/lists/bannedsearchtermlist'
196
+#weightedsearchtermlist = '/etc/e2guardian/lists/weightedsearchtermlist'
197
+#exceptionsearchtermlist = '/etc/e2guardian/lists/exceptionsearchtermlist'
198 198
 
199 199
 # Category display threshold
200 200
 # This option only applies to pages blocked by weighted phrase filtering.
@@ -330,12 +330,12 @@ reportinglevel = 3
330 330
 # only used in reporting level 3.
331 331
 #
332 332
 # The default template file path is <languagedir>/<language>/template.h
333
-# e.g. share/e2guardian/languages/ukenglish/template.html when using 'ukenglish'
333
+# e.g. /share/e2guardian/languages/ukenglish/template.html when using 'ukenglish'
334 334
 # language.
335 335
 #
336 336
 # This option generates a file path of the form:
337 337
 # <languagedir>/<language>/<htmltemplate>
338
-# e.g. share/e2guardian/languages/ukenglish/custom.html
338
+# e.g. /share/e2guardian/languages/ukenglish/custom.html
339 339
 #
340 340
 #htmltemplate = 'custom.html'
341 341
 
@@ -420,7 +420,11 @@ reportinglevel = 3
420 420
 sslcertcheck = off
421 421
 
422 422
 #SSL man in the middle
423
-# Forge ssl certificates for all sites, decrypt the data then re encrypt it
423
+# Forge ssl certificates for all non-exception sites, decrypt the data then re encrypt it
424 424
 # using a different private key. Used to filter ssl sites
425 425
 sslmitm = off
426 426
 
427
+#Limit SSL MITM to sites in greysslsitelist(s)
428
+# ignored if  sslmitm is off
429
+# SSL sites not matching greysslsitelist will be treat as if sslmitm is off.
430
+onlymitmsslgrey = off