From c718d9e04ab21922fba80ae105aa3df9d1c58616 Mon Sep 17 00:00:00 2001 From: Sepehrdad Sh Date: Tue, 13 Oct 2020 01:11:36 +0200 Subject: [PATCH] fix tor and refactor --- torctl | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/torctl b/torctl index 55adacf..ba0d943 100755 --- a/torctl +++ b/torctl @@ -15,7 +15,7 @@ ################################################################################ # torctl.sh version -VERSION="torctl.sh v0.5.5" +VERSION="torctl.sh v0.5.6" # exclude locals TOR_EXCLUDE="192.168.0.0/16 172.16.0.0/12 10.0.0.0/8" @@ -152,7 +152,7 @@ wipe() { } get_ip() { - RADDR=$(wget -qO- http://ipecho.net/plain) + RADDR=$(curl -s https://ipinfo.io/ip) msg "remote ip: $RADDR" } @@ -236,6 +236,7 @@ gen_torrc() { warn "configuring tor" cat >"${TORRC}" <"/dev/null" - sysctl -w vm.dirty_background_ratio=5 &>"/dev/null" - sysctl -w vm.dirty_expire_centisecs=2000 &>"/dev/null" - sysctl -w vm.dirty_writeback_centisecs=1000 &>"/dev/null" - sysctl -w vm.swappiness=10 &>"/dev/null" - sysctl -w vm.vfs_cache_pressure=70 &>"/dev/null" - # Disable Explicit Congestion Notification in TCP sysctl -w net.ipv4.tcp_ecn=0 &>"/dev/null" @@ -448,8 +442,7 @@ start() { # generate new resolv.conf gen_resolv_conf - # start needed services - start_service iptables + # start tor service start_service tor # apply new iptables rules