Commit 63a40a93 authored by dmknght's avatar dmknght

Parse trans port from torrc instead of hardcoded

parent 89a4f06f
Pipeline #749 failed with stages
......@@ -50,7 +50,7 @@ TOR_EXCLUDE="192.168.0.0/16 172.16.0.0/12 10.0.0.0/8"
TOR_UID="debian-tor"
# Tor's TransPort
TOR_PORT="9040"
# TOR_PORT="9040"
function disableService {
......@@ -81,8 +81,7 @@ function enableService {
function start {
# If tor didn't start, we start it
# It is used for startup
# sleep 3
TOR_PORT=`cat /etc/tor/torrc | grep TransPort | cut -d " " -f 2 | cut -d ":" -f 2`
# Init DNS
echo -e " $GREEN*$BLUE Modified resolv.conf to use Tor\n"
/usr/bin/dnstool create-backup
......@@ -134,7 +133,6 @@ function start {
echo -e " $GREEN*$BLUE Allowing only tor to browse in clearnet\n"
/usr/sbin/iptables -A OUTPUT -m owner --uid-owner $TOR_UID -j ACCEPT
/usr/sbin/iptables -A OUTPUT -j REJECT
# sleep 2
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment