1
results
for block
-
难度等级: 可能需要更长的时间
对于我的暗网封锁器,我只需要一个Tor出口节点IO列表和以下规则。 location / { limit_req zone=one; #request limit limit_conn addr include /etc/nginx/conf.d/tor-ips.conf; #tor ips blocken ... } 通过以下脚本,我可以创建一个Ip黑名单。 IP更新脚本 #!/bin/sh # Copyright 2012, Nico R. Wohlgemuth <nico@lifeisabug.com> WGET=/usr/bin/wget LIST=/etc/nginx/conf.d/tor-ips.conf #ziel der blacklist LISTBAK=/etc/nginx/conf.d/tor-ips.bak TEMPLIST=/tmp/torlist.txt wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > $TEMPLIST if [ ! -s $TMPTEMPLIST ]; then echo "error: list is empty or was not downloaded" exit 1 fi head -n3 $TEMPLIST tail -n3 $TEMPLIST echo -e "\ndoes this look okay?