mirror of
https://github.com/bol-van/zapret.git
synced 2026-09-02 07:11:30 +04:00
Truncated history
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
d1:ad2:id20:.+NA-¢ÔutÚÛE–wΑiJ·9:info_hash20:;
|
||||
ÂÅÙä¾§¾“äÙOÁ£2IÂe1:q9:get_peers1:t2:äâ1:v4:LT1:y1:qe
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
GET / HTTP/1.1
|
||||
Host: www.iana.org
|
||||
Connection: keep-alive
|
||||
Upgrade-Insecure-Requests: 1
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4300.0 Safari/537.36
|
||||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
|
||||
Accept-Encoding: gzip, deflate
|
||||
Accept-Language: en-US,en;q=0.9,ru;q=0.8
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/system/bin/busybox sh
|
||||
|
||||
# download hostlist from http(s) (need curl, its absent by default),
|
||||
# feed it to zapret. save flash write cycles
|
||||
|
||||
u="https://your.host.com/censorship/hoslist.txt"
|
||||
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
EXEDIR=$(dirname "$SCRIPT")
|
||||
|
||||
d=/data/censorship
|
||||
[ -d $d ] || mkdir $d
|
||||
f=$d/hostlist.txt
|
||||
t=/hostlist.txt
|
||||
|
||||
curl -k --fail --max-time 10 -o "$t" "$u" && {
|
||||
if [ -s "$t" ]; then
|
||||
m1=$(md5sum "$t" | cut -d ' ' -f 1)
|
||||
m2=$(md5sum "$f" | cut -d ' ' -f 1)
|
||||
echo $m1 $m2
|
||||
if [ -z "$m2" ] || [ "$m1" != "$m2" ]; then
|
||||
echo updating hostlist
|
||||
cp -f "$t" "$f"
|
||||
else
|
||||
echo hostlist was not changed. keeping old copy
|
||||
fi
|
||||
else
|
||||
echo downloaded hostlist is empty. disabling zapret
|
||||
rm "$f"
|
||||
fi
|
||||
}
|
||||
|
||||
rm -f "$t"
|
||||
"$EXEDIR/unzapret"
|
||||
[ -s "$f" ] && exec "$EXEDIR/zapret" "--hostlist=$f"
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/system/bin/busybox sh
|
||||
|
||||
# download hostlist from http(s) (need curl, its absent by default),
|
||||
# resolve to ip list, feed to zapret-ip. save flash write cycles
|
||||
|
||||
u="https://your.host.com/censorship/hoslist.txt"
|
||||
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
EXEDIR=$(dirname "$SCRIPT")
|
||||
|
||||
d=/data/censorship
|
||||
[ -d $d ] || mkdir $d
|
||||
f=$d/hostlist.txt
|
||||
t=/hostlist.txt
|
||||
i=/iplist.txt
|
||||
|
||||
curl -k --fail --max-time 10 -o "$t" "$u" && {
|
||||
if [ -s "$t" ]; then
|
||||
m1=$(md5sum "$t" | cut -d ' ' -f 1)
|
||||
m2=$(md5sum "$f" | cut -d ' ' -f 1)
|
||||
echo $m1 $m2
|
||||
if [ -z "$m2" ] || [ "$m1" != "$m2" ]; then
|
||||
echo updating hostlist
|
||||
cp -f "$t" "$f"
|
||||
else
|
||||
echo hostlist was not changed. keeping old copy
|
||||
fi
|
||||
else
|
||||
echo downloaded hostlist is empty. disabling zapret
|
||||
rm "$f"
|
||||
fi
|
||||
}
|
||||
|
||||
rm -f "$t"
|
||||
"$EXEDIR/unzapret-ip"
|
||||
[ -s "$f" ] && {
|
||||
mdig --threads=10 --family=4 <"$f" >"$i"
|
||||
[ -s "$i" ] && exec "$EXEDIR/zapret-ip" "$i"
|
||||
}
|
||||
Binary file not shown.
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/system/bin/busybox sh
|
||||
|
||||
rule="PREROUTING -t nat -i br0 ! -d 192.168.0.0/16 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-port 1"
|
||||
iptables -C $rule 2>/dev/null && iptables -D $rule
|
||||
killall tpws
|
||||
|
||||
rule="OUTPUT -t mangle -o wan0 -p tcp -m multiport --dports 80,443 -m mark ! --mark 0x40000000/0x40000000 -j NFQUEUE --queue-num 200 --queue-bypass"
|
||||
iptables -C $rule 2>/dev/null && iptables -D $rule
|
||||
killall nfqws
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/system/bin/busybox sh
|
||||
|
||||
rule="PREROUTING -t nat -i br0 -p tcp -m multiport --dports 80,443 -j tpws"
|
||||
iptables -C $rule 2>/dev/null && iptables -D $rule
|
||||
iptables -F tpws -t nat
|
||||
iptables -X tpws -t nat
|
||||
killall tpws
|
||||
|
||||
rule="OUTPUT -t mangle -o wan0 -p tcp -m multiport --dports 80,443 -m mark ! --mark 0x40000000/0x40000000 -j NFQUEUE --queue-num 200 --queue-bypass"
|
||||
iptables -C $rule 2>/dev/null && iptables -D $rule
|
||||
killall nfqws
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/system/bin/busybox sh
|
||||
|
||||
# $1 - additional parameters for nfqws
|
||||
|
||||
insmod /online/modules/unfuck_nfqueue.ko 2>/dev/null
|
||||
|
||||
rule="PREROUTING -t nat -i br0 ! -d 192.168.0.0/16 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-port 1"
|
||||
iptables -C $rule 2>/dev/null || iptables -I $rule
|
||||
|
||||
tpws --uid 1:3003 --port=1 --daemon
|
||||
|
||||
rule="OUTPUT -t mangle -o wan0 -p tcp -m multiport --dports 80,443 -m mark ! --mark 0x40000000/0x40000000 -j NFQUEUE --queue-num 200 --queue-bypass"
|
||||
iptables -C $rule 2>/dev/null || iptables -I $rule
|
||||
|
||||
nfqws --uid 2 --qnum=200 --dpi-desync=disorder --dpi-desync-ttl=8 --dpi-desync-fooling=md5sig --daemon $1
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/system/bin/busybox sh
|
||||
|
||||
# $1 - ip list file. create individual rules for tpws redirection. ipset is not available
|
||||
|
||||
[ -z "$1" ] && {
|
||||
echo need iplist file as parameter
|
||||
exit 1
|
||||
}
|
||||
|
||||
insmod /online/modules/unfuck_nfqueue.ko 2>/dev/null
|
||||
|
||||
tpws --maxconn=1024 --uid 1:3003 --port=1 --daemon
|
||||
|
||||
|
||||
REDIR="-j REDIRECT --to-port 1"
|
||||
|
||||
iptables -F tpws -t nat
|
||||
iptables -X tpws -t nat
|
||||
iptables -N tpws -t nat
|
||||
iptables -A tpws -t nat -d 192.168.0.0/16 -j RETURN
|
||||
|
||||
while read ip; do
|
||||
echo redirecting $ip
|
||||
iptables -A tpws -t nat -d $ip -p tcp $REDIR
|
||||
done <"$1"
|
||||
|
||||
|
||||
rule="PREROUTING -t nat -i br0 -p tcp -m multiport --dports 80,443 -j tpws"
|
||||
iptables -C $rule 2>/dev/null || iptables -I $rule
|
||||
|
||||
nfqws --uid 2 --qnum=200 --dpi-desync=disorder --dpi-desync-ttl=8 --dpi-desync-fooling=md5sig --daemon
|
||||
|
||||
rule="OUTPUT -t mangle -o wan0 -p tcp -m multiport --dports 80,443 -m mark ! --mark 0x40000000/0x40000000 -j NFQUEUE --queue-num 200 --queue-bypass"
|
||||
iptables -C $rule 2>/dev/null || iptables -I $rule
|
||||
Reference in New Issue
Block a user