浏览代码

Tor traffic is per month

Bob Mottram 7 年前
父节点
当前提交
3280d9dd4d
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 2
    2
      src/freedombone-image-customise
  2. 3
    3
      src/freedombone-utils-onion

+ 2
- 2
src/freedombone-image-customise 查看文件

@@ -1733,8 +1733,8 @@ function image_setup_utils {
1733 1733
     chroot "$rootdir" connect-proxy
1734 1734
     sed -i 's|#Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
1735 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 1738
     if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then
1739 1739
         if [ ! -d $rootdir/root/.ssh ]; then
1740 1740
             mkdir $rootdir/root/.ssh

+ 3
- 3
src/freedombone-utils-onion 查看文件

@@ -29,7 +29,7 @@
29 29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30 30
 
31 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 34
 HIDDEN_SERVICE_PATH='/var/lib/tor/hidden_service_'
35 35
 
@@ -284,8 +284,8 @@ function install_tor {
284 284
     sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
285 285
 
286 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 290
     mark_completed $FUNCNAME
291 291
 }