From 3280d9dd4d4e7fc36cb9d081e79af7d57779b053 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 29 Jan 2018 14:07:09 +0000 Subject: [PATCH] Tor traffic is per month --- src/freedombone-image-customise | 4 ++-- src/freedombone-utils-onion | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 2b27e144..71c1e02c 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -1733,8 +1733,8 @@ function image_setup_utils { chroot "$rootdir" connect-proxy sed -i 's|#Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc sed -i 's|Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc - sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" $rootdir/etc/tor/torrc - sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" $rootdir/etc/tor/torrc + sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" $rootdir/etc/tor/torrc + sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" $rootdir/etc/tor/torrc if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then if [ ! -d $rootdir/root/.ssh ]; then mkdir $rootdir/root/.ssh diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index 95421099..c9cd0b39 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -29,7 +29,7 @@ # along with this program. If not, see . # The maximum amount of traffic per day in gigabytes -TOR_MAX_TRAFFIC_PER_DAY_GB=3 +TOR_MAX_TRAFFIC_PER_MONTH_GB=10 HIDDEN_SERVICE_PATH='/var/lib/tor/hidden_service_' @@ -284,8 +284,8 @@ function install_tor { sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc # Restrict traffic - sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" /etc/tor/torrc - sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" /etc/tor/torrc + sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" /etc/tor/torrc + sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" /etc/tor/torrc mark_completed $FUNCNAME }