Tor traffic is per month
This commit is contained in:
parent
1cc92c9359
commit
3280d9dd4d
|
@ -1733,8 +1733,8 @@ function image_setup_utils {
|
||||||
chroot "$rootdir" connect-proxy
|
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|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_MONTH_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
|
||||||
if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then
|
if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then
|
||||||
if [ ! -d $rootdir/root/.ssh ]; then
|
if [ ! -d $rootdir/root/.ssh ]; then
|
||||||
mkdir $rootdir/root/.ssh
|
mkdir $rootdir/root/.ssh
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# The maximum amount of traffic per day in gigabytes
|
# 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_'
|
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
|
sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
||||||
|
|
||||||
# Restrict traffic
|
# 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_MONTH_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
|
||||||
|
|
||||||
mark_completed $FUNCNAME
|
mark_completed $FUNCNAME
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue