Ver código fonte

Tor traffic is per month

Bob Mottram 7 anos atrás
pai
commit
3280d9dd4d
2 arquivos alterados com 5 adições e 5 exclusões
  1. 2
    2
      src/freedombone-image-customise
  2. 3
    3
      src/freedombone-utils-onion

+ 2
- 2
src/freedombone-image-customise Ver arquivo

1733
     chroot "$rootdir" connect-proxy
1733
     chroot "$rootdir" connect-proxy
1734
     sed -i 's|#Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
1734
     sed -i 's|#Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
1735
     sed -i 's|Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
1735
     sed -i 's|Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
1736
-    sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" $rootdir/etc/tor/torrc
1737
-    sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" $rootdir/etc/tor/torrc
1736
+    sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" $rootdir/etc/tor/torrc
1737
+    sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" $rootdir/etc/tor/torrc
1738
     if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then
1738
     if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then
1739
         if [ ! -d $rootdir/root/.ssh ]; then
1739
         if [ ! -d $rootdir/root/.ssh ]; then
1740
             mkdir $rootdir/root/.ssh
1740
             mkdir $rootdir/root/.ssh

+ 3
- 3
src/freedombone-utils-onion Ver arquivo

29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
 # The maximum amount of traffic per day in gigabytes
31
 # The maximum amount of traffic per day in gigabytes
32
-TOR_MAX_TRAFFIC_PER_DAY_GB=3
32
+TOR_MAX_TRAFFIC_PER_MONTH_GB=10
33
 
33
 
34
 HIDDEN_SERVICE_PATH='/var/lib/tor/hidden_service_'
34
 HIDDEN_SERVICE_PATH='/var/lib/tor/hidden_service_'
35
 
35
 
284
     sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
284
     sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
285
 
285
 
286
     # Restrict traffic
286
     # Restrict traffic
287
-    sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" /etc/tor/torrc
288
-    sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" /etc/tor/torrc
287
+    sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" /etc/tor/torrc
288
+    sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" /etc/tor/torrc
289
 
289
 
290
     mark_completed $FUNCNAME
290
     mark_completed $FUNCNAME
291
 }
291
 }