Tidying
This commit is contained in:
parent
831d4487b9
commit
48afc21624
|
@ -342,37 +342,6 @@ function install_tor {
|
|||
mark_completed "${FUNCNAME[0]}"
|
||||
}
|
||||
|
||||
function resolve_dns_via_tor {
|
||||
if [[ $SYSTEM_TYPE == "mesh"* ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ $(is_completed "${FUNCNAME[0]}") == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ! -f /etc/tor/torrc ]; then
|
||||
echo $'tor was not installed'
|
||||
exit 52952
|
||||
fi
|
||||
|
||||
# resolve DNS via tor
|
||||
if ! grep -q 'DNSPort 53' /etc/tor/torrc; then
|
||||
{ echo 'DNSPort 53';
|
||||
echo 'AutomapHostsOnResolve 1';
|
||||
echo 'AutomapHostsSuffixes .exit,.onion'; } >> /etc/tor/torrc
|
||||
onion_update
|
||||
fi
|
||||
|
||||
# don't change resolv.conf
|
||||
sed -i 's|, domain-name-servers||g' /etc/dhcp/dhclient.conf
|
||||
|
||||
# point resolv.conf to tor
|
||||
resolvconf=/etc/resolvconf/resolv.conf.d/head
|
||||
echo 'nameserver 127.0.0.1:53' > $resolvconf
|
||||
resolvconf -u
|
||||
|
||||
mark_completed "${FUNCNAME[0]}"
|
||||
}
|
||||
|
||||
# see https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy
|
||||
# Local Redirection and Anonymizing Middlebox
|
||||
function route_outgoing_traffic_through_tor {
|
||||
|
|
|
@ -903,9 +903,6 @@ function setup_utils {
|
|||
function_check install_tor
|
||||
install_tor
|
||||
|
||||
#function_check resolve_dns_via_tor
|
||||
#resolve_dns_via_tor
|
||||
|
||||
function_check install_command_line_browser
|
||||
install_command_line_browser
|
||||
|
||||
|
|
Loading…
Reference in New Issue