Skip to content

Commit 2a3a384

Browse files
committed
add scripts to update and apply blocklist
1 parent abe7dee commit 2a3a384

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

install.sh

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -xue
44

55
apt-get --yes install nginx-extras
66
apt-get --yes install luarocks
7+
apt-get --yes install curl
78
luarocks install onion2web
89

910
cp example.nginx /etc/nginx/nginx.conf
@@ -18,3 +19,8 @@ chmod +x install-tor2web
1819
./install-tor2web
1920

2021
service nginx restart
22+
23+
curl "https://raw.githubusercontent.com/globaleaks/Tor2web/b6ead9ffeaa0d52cc70b4bc9d82a9bbea45b94e0/lists/blocklist_hashed.txt" > /etc/blocklist-tor2web.txt
24+
cp update-blocklist.sh /etc/cron.daily/update-blocklist.sh
25+
chmod +x /etc/cron.daily/update-blocklist.sh
26+
/etc/cron.daily/update-blocklist.sh

update-blocklist.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -xue
4+
5+
curl https://ahmia.fi/blacklist/banned/ | egrep -o '[0-9a-f]{32}' > /etc/blocklist-ahmia.txt
6+
cat /etc/blocklist-*.txt > /etc/blocklist.txt
7+
8+
service nginx reload

0 commit comments

Comments
 (0)