Skip to content

Commit d1fc59f

Browse files
committed
test tor
1 parent b2a6920 commit d1fc59f

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

Install/openWRT23_install.sh

+31-27
Original file line numberDiff line numberDiff line change
@@ -32344,6 +32344,7 @@ nft replace rule inet fw4 ${TOR_CHAIN} \
3234432344
handle ${TOR_RULE##* } \
3234532345
fib daddr type != { local, broadcast } ${TOR_RULE}
3234632346
EOF
32347+
3234732348
uci -q delete firewall.tor_nft
3234832349
uci set firewall.tor_nft="include"
3234932350
uci set firewall.tor_nft.path="/etc/nftables.d/tor.sh"
@@ -32376,10 +32377,10 @@ service firewall restart
3237632377
}
3237732378

3237832379
setup_tor_routing() {
32379-
iptables -t nat -A PREROUTING -i inet -p tcp --syn -j REDIRECT --to-ports $TOR_TRANS_port
32380-
iptables -A FORWARD -i inet -o wan -j ACCEPT
32381-
iptables -A FORWARD -i wan -o inet -j ACCEPT
32382-
iptables -t nat -A POSTROUTING -o wan -j MASQUERADE
32380+
iptables -t nat -A PREROUTING -i inet -p tcp --syn -j REDIRECT --to-ports $TOR_TRANS_port
32381+
iptables -A FORWARD -i inet -o wan -j ACCEPT
32382+
iptables -A FORWARD -i wan -o inet -j ACCEPT
32383+
iptables -t nat -A POSTROUTING -o wan -j MASQUERADE
3238332384
}
3238432385

3238532386
set_HS_Firewall() {
@@ -32477,16 +32478,16 @@ processes=$(uci commit && reload_config)
3247732478
wait $processes >> /root/install.log
3247832479
/etc/init.d/firewall restart >> /root/install.log
3247932480
if [ "$SECURE_RULES" = "" ]
32480-
then
32481-
FW_HSactive='1'
32482-
set_HS_Firewall
32483-
elif [ "$SECURE_RULES" = "y" ]
32484-
then
32481+
then
3248532482
FW_HSactive='1'
32486-
set_HS_Firewall
32487-
else
32488-
FW_HSactive='0'
32489-
set_HS_Firewall_disable
32483+
set_HS_Firewall
32484+
elif [ "$SECURE_RULES" = "y" ]
32485+
then
32486+
FW_HSactive='1'
32487+
set_HS_Firewall
32488+
else
32489+
FW_HSactive='0'
32490+
set_HS_Firewall_disable
3249032491
fi
3249132492

3249232493
view_config
@@ -34812,22 +34813,22 @@ uci set firewall.blockIncoming.target="REJECT"
3481234813
uci set firewall.blockIncoming.enabled="1"
3481334814
if [ "$TOR_ONION" = "1" ]
3481434815
then
34815-
setup_tor_routing
34816+
setup_tor_routing
3481634817
fi
3481734818
echo
3481834819
echo 'Firewall active: ' $SECURE_RULES
3481934820
echo
3482034821
if [ "$SECURE_RULES" = "" ]
34821-
then
34822-
FW_HSactive='1'
34823-
set_HS_Firewall
34824-
elif [ "$SECURE_RULES" = "y" ]
34825-
then
34822+
then
3482634823
FW_HSactive='1'
34827-
set_HS_Firewall
34828-
else
34829-
FW_HSactive='0'
34830-
set_HS_Firewall_disable
34824+
set_HS_Firewall
34825+
elif [ "$SECURE_RULES" = "y" ]
34826+
then
34827+
FW_HSactive='1'
34828+
set_HS_Firewall
34829+
else
34830+
FW_HSactive='0'
34831+
set_HS_Firewall_disable
3483134832
fi
3483234833

3483334834
processes=$(uci commit && reload_config)
@@ -35029,11 +35030,14 @@ if [ "$TOR_ONION" = "1" ]
3502935030
echo
3503035031
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S) ' Set Firewall-Intercept'
3503135032
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S) ' Set Firewall-Intercept' >> /root/install.log
35032-
set_firewall_intercept >> /root/install.log
35033+
# set_firewall_intercept >> /root/install.log
35034+
test_tor_dns_intercept >> /root/install.log
35035+
test_Intercept_TCP >> /root/install.log
35036+
3503335037
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S) ' Routing über Tor Onion einrichten'
35034-
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S) ' Routing über Tor Onion einrichten' >> /root/install.log
35035-
setup_tor_routing >> /root/install.log
35036-
fi
35038+
echo $(date +%d'.'%m'.'%y' '%H':'%M':'%S) ' Routing über Tor Onion einrichten' >> /root/install.log
35039+
# setup_tor_routing >> /root/install.log
35040+
#fi
3503735041

3503835042
#echo
3503935043
#echo >> /root/install.log

0 commit comments

Comments
 (0)