diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index 6ce0ed75..1d5fe377 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -28,6 +28,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +# The maximum amount of traffic per day in gigabytes +TOR_MAX_TRAFFIC_PER_DAY_GB=3 + function add_email_hostname { extra_email_hostname="$1" email_hostnames=$(cat /etc/exim4/update-exim4.conf.conf | grep "dc_other_hostnames" | awk -F "'" '{print $2}') @@ -287,6 +290,10 @@ function install_tor { sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc 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 + mark_completed $FUNCNAME }