Skip to content
Snippets Groups Projects
Commit 109d6bf8 authored by Bob Mottram's avatar Bob Mottram
Browse files

Restrict tor traffic

parent 5e76d9bc
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,9 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment