diff options
author | amontero <amontero@166637.no-reply.drupal.org> | 2013-06-28 03:05:52 +0200 |
---|---|---|
committer | amontero <amontero@166637.no-reply.drupal.org> | 2013-06-28 03:05:52 +0200 |
commit | 95eca7cc0da65be69495fb67b152e678ba6d9c75 (patch) | |
tree | 5762013eea7efe0995062c2da6ff7cac6927b591 | |
parent | af692e5858753ed695043ff8bc1d33f227fb0f85 (diff) | |
download | puppet-tor-95eca7cc0da65be69495fb67b152e678ba6d9c75.tar.gz puppet-tor-95eca7cc0da65be69495fb67b152e678ba6d9c75.tar.bz2 |
Add PortForwarding to allow UPnP firewall pf configuration.
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | manifests/daemon/relay.pp | 1 | ||||
-rw-r--r-- | templates/torrc.relay.erb | 4 |
3 files changed, 6 insertions, 1 deletions
@@ -133,6 +133,8 @@ You have the following options that can be passed to a relay, with the defaults $port = 0, $listen_addresses = [], +$portforwarding = 0, # PortForwarding 0|1, set for opening ports at the router via UPnP. + # Requires 'tor-fw-helper' binary present. $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. diff --git a/manifests/daemon/relay.pp b/manifests/daemon/relay.pp index d92a8b9..3ef8602 100644 --- a/manifests/daemon/relay.pp +++ b/manifests/daemon/relay.pp @@ -3,6 +3,7 @@ define tor::daemon::relay( $port = 0, $listen_addresses = [], $outbound_bindaddresses = [], + $portforwarding = 0, # KB/s, defaulting to using tor's default: 5120KB/s $bandwidth_rate = '', # KB/s, defaulting to using tor's default: 10240KB/s diff --git a/templates/torrc.relay.erb b/templates/torrc.relay.erb index 85320d3..74a7c61 100644 --- a/templates/torrc.relay.erb +++ b/templates/torrc.relay.erb @@ -13,6 +13,9 @@ Nickname <%= nickname %> <%- if address != '' then -%> Address <%= address %> <%- end -%> +<%- if portforwarding != '0' then -%> +PortForwarding <%= portforwarding %> +<%- end -%> <%- if bandwidth_rate != '' then -%> BandwidthRate <%= bandwidth_rate %> KB <%- end -%> @@ -41,4 +44,3 @@ MyFamily <%= my_family %> <%- if bridge_relay != '0' then -%> BridgeRelay <%= bridge_relay %> <%- end -%> - |