]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
switch bandwidth_rate and bandwidth_burst to be relay_bandwidth_rate and
authorMicah Anderson <micah@riseup.net>
Tue, 31 Jul 2012 02:08:30 +0000 (22:08 -0400)
committerMicah Anderson <micah@riseup.net>
Tue, 31 Jul 2012 02:08:53 +0000 (22:08 -0400)
relay_bandwidth_burst so we can use those variables for their proper tor
configuration variables

manifests/daemon.pp
templates/torrc.relay.erb

index 6d8c315b2993d2f61dfd3f803d166a6d1ef30876..5150c96eb9d28a3cd2258879af45ea992f772d69 100644 (file)
@@ -101,9 +101,11 @@ class tor::daemon inherits tor {
   define relay( $port                    = 0,
                 $listen_addresses        = [],
                 $outbound_bindaddresses  = $listen_addresses,
-                $bandwidth_rate  = 0,    # KB/s, 0 for no limit.
-                $bandwidth_burst = 0,    # KB/s, 0 for no limit.
-                $accounting_max          = 0,  # GB, 0 for no limit.
+                $bandwidth_rate          = '',    # KB/s, defaulting to using tor's default: 5120KB/s
+                $bandwidth_burst         = '',    # KB/s, defaulting to using tor's default: 10240KB/s
+                $relay_bandwidth_rate    = 0,     # KB/s, 0 for no limit.
+                $relay_bandwidth_burst   = 0,     # KB/s, 0 for no limit.
+                $accounting_max          = 0,     # GB, 0 for no limit.
                 $accounting_start        = [],
                 $contact_info            = '',
                 $my_family               = '', # TODO: autofill with other relays
index 2ab34bfa1a6b0deee9b5eab3ca3cedba8f77724f..71c94b98f657f2ff2965ded8c153baa56c6d6725 100644 (file)
@@ -13,11 +13,17 @@ Nickname <%= nickname %>
 <%-   if address != '' then -%>
 Address <%= address %>
 <%-   end -%>
-<%-   if bandwidth_rate != '0' then -%>
-RelayBandwidthRate <%= bandwidth_rate %> KB
+<%-   if bandwidth_rate != '' then -%>
+BandwidthRate <%= bandwidth_rate %> KB
 <%-   end -%>
-<%-   if bandwidth_burst != '0' then -%>
-RelayBandwidthBurst <%= bandwidth_burst %> KB
+<%-   if bandwidth_burst != '' then -%>
+BandwidthBurst <%= bandwidth_burst %> KB
+<%-   end -%>
+<%-   if relay_bandwidth_rate != '0' then -%>
+RelayBandwidthRate <%= relay_bandwidth_rate %> KB
+<%-   end -%>
+<%-   if relay_bandwidth_burst != '0' then -%>
+RelayBandwidthBurst <%= relay_bandwidth_burst %> KB
 <%-   end -%>
 <%-   if accounting_max != '0' then -%>
 AccountingMax <%= accounting_max %> GB