mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-01-15 03:04:39 +00:00
parent
fa22d94d5a
commit
467804eb74
@ -118,55 +118,16 @@ firewall_stop_v6() {
|
||||
_iptables ip6tables -D OUTPUT -t filter -m mark --mark 32768/32768 -j ACCEPT
|
||||
}
|
||||
|
||||
check_ipt_connbytes() {
|
||||
iptables -C FORWARD -m connbytes --connbytes-dir original --connbytes-mode packets --connbytes 0:19 -j ACCEPT &>/dev/null
|
||||
|
||||
if [ $? -eq 2 ]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_ipt_nfqueue() {
|
||||
iptables -C FORWARD -t mangle -j NFQUEUE --queue-num 537 &>/dev/null
|
||||
|
||||
if [ $? -eq 2 ]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
kernel_modules_load() {
|
||||
KERNEL=$(uname -r)
|
||||
|
||||
if ! check_ipt_connbytes; then
|
||||
connbytes_mod_path=$(find /lib/modules/$(uname -r) -name "xt_connbytes.ko*")
|
||||
|
||||
if [ -z "$connbytes_mod_path" ]; then
|
||||
echo -e "$ansi_red Cannot find xt_connbytes.ko module $ansi_std"
|
||||
else
|
||||
insmod "$connbytes_mod_path" || exit 1
|
||||
echo "xt_connbytes.ko loaded"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! check_ipt_nfqueue; then
|
||||
nfqueue_mod_path=$(find /lib/modules/$(uname -r) -name "xt_NFQUEUE.ko*")
|
||||
|
||||
if [ -z "$nfqueue_mod_path" ]; then
|
||||
echo -e "$ansi_red Cannot find xt_NFQUEUE.ko module $ansi_std"
|
||||
else
|
||||
insmod "$nfqueue_mod_path" || exit 1
|
||||
echo "xt_NFQUEUE.ko loaded"
|
||||
fi
|
||||
fi
|
||||
(modprobe xt_connbytes --first-time &>/dev/null && echo "xt_connbytes loaded") || true
|
||||
(modprobe xt_NFQUEUE --first-time &>/dev/null && echo "xt_NFQUEUE loaded") || true
|
||||
}
|
||||
|
||||
system_config() {
|
||||
sysctl -w net.netfilter.nf_conntrack_checksum=0 &> /dev/null || exit 1
|
||||
sysctl -w net.netfilter.nf_conntrack_tcp_be_liberal=1 &> /dev/null || exit 1
|
||||
sysctl -w net.netfilter.nf_conntrack_checksum=0 &> /dev/null || true
|
||||
sysctl -w net.netfilter.nf_conntrack_tcp_be_liberal=1 &> /dev/null || true
|
||||
}
|
||||
|
||||
status() {
|
||||
|
Loading…
Reference in New Issue
Block a user