From d5c17a1c842bbec4d0172895d715f5ce48fb7068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Wed, 1 Nov 2017 16:47:02 -0400 Subject: *ListenAddress (OR, DNS, Trans, etc.) are deprecated since 0.2.3.x-alpha --- README.md | 17 ++++++----------- manifests/daemon/directory.pp | 1 - manifests/daemon/dns.pp | 3 +-- manifests/daemon/relay.pp | 1 - manifests/daemon/socks.pp | 1 - manifests/daemon/transparent.pp | 3 +-- templates/torrc.directory.erb | 3 --- templates/torrc.dns.erb | 3 --- templates/torrc.relay.erb | 2 -- templates/torrc.socks.erb | 3 --- templates/torrc.transparent.erb | 3 --- 11 files changed, 8 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 2f2ebf2..7186ab7 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ exit policies, etc. ## Upgrade Notice + * All of the `listen_address` variables have been deprecated, since they have + been deprecated in tor since 0.2.3.x-alpha. Please read the new tor man page + if you were using those variables. + * Previously, if you did not set the `$outbound_bindaddress` variable, it was being automatically set to the `$listen_address variable`. Now this is not being done and instead you will need to set the `$outbound_bindaddress` @@ -111,16 +115,10 @@ directly to the tor::daemon in your manifests, e.g.: To configure tor socks support, you can do the following: tor::daemon::socks { "listen_locally": - listen_addresses => [ '127.0.0.1' ]; + port => 0, + policies => 'your super policy'; } -This will setup the `SocksListenAddress` to be `127.0.0.1`. You also can pass -the following options to `tor::daemon::socks`: - - $port = 0 - SocksPort - $listen_address - can pass multiple values to configure SocksListenAddress lines - $policies - can pass multiple values to configure SocksPolicy lines - ## Installing torsocks To install torsocks, simply include the `torsocks` class in your manifests: @@ -136,7 +134,6 @@ An example relay configuration: tor::daemon::relay { "foobar": port => '9001', - listen_addresses => '192.168.0.1', address => '192.168.0.1', bandwidth_rate => '256', bandwidth_burst => '256', @@ -148,7 +145,6 @@ You have the following options that can be passed to a relay, with the defaults shown: $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 @@ -194,7 +190,6 @@ An example directory configuration: tor::daemon::directory { 'ssh_directory': port => '80', - listen_addresses => '192.168.0.1', port_front_page => '/etc/tor/tor.html'; } diff --git a/manifests/daemon/directory.pp b/manifests/daemon/directory.pp index fa7d52d..3eaef9f 100644 --- a/manifests/daemon/directory.pp +++ b/manifests/daemon/directory.pp @@ -1,7 +1,6 @@ # directory advertising define tor::daemon::directory ( $port = 0, - $listen_addresses = [], $port_front_page = '/etc/tor/tor-exit-notice.html', $ensure = present ) { diff --git a/manifests/daemon/dns.pp b/manifests/daemon/dns.pp index e2141c9..599abd8 100644 --- a/manifests/daemon/dns.pp +++ b/manifests/daemon/dns.pp @@ -1,7 +1,6 @@ # DNS definition define tor::daemon::dns( - $port = 0, - $listen_addresses = [] ) { + $port = 0 ) { concat::fragment { "08.dns.${name}": content => template('tor/torrc.dns.erb'), diff --git a/manifests/daemon/relay.pp b/manifests/daemon/relay.pp index 056bbf6..fa908f5 100644 --- a/manifests/daemon/relay.pp +++ b/manifests/daemon/relay.pp @@ -1,7 +1,6 @@ # relay definition define tor::daemon::relay( $port = 0, - $listen_addresses = [], $outbound_bindaddresses = [], $portforwarding = 0, # KB/s, defaulting to using tor's default: 5120KB/s diff --git a/manifests/daemon/socks.pp b/manifests/daemon/socks.pp index 54c8b6a..cb130d9 100644 --- a/manifests/daemon/socks.pp +++ b/manifests/daemon/socks.pp @@ -1,7 +1,6 @@ # socks definition define tor::daemon::socks( $port = 0, - $listen_addresses = [], $policies = [] ) { concat::fragment { '02.socks': diff --git a/manifests/daemon/transparent.pp b/manifests/daemon/transparent.pp index 7115fee..90c0142 100644 --- a/manifests/daemon/transparent.pp +++ b/manifests/daemon/transparent.pp @@ -1,7 +1,6 @@ # Transparent proxy definition define tor::daemon::transparent( - $port = 0, - $listen_addresses = [] ) { + $port = 0 ) { concat::fragment { "09.transparent.${name}": content => template('tor/torrc.transparent.erb'), diff --git a/templates/torrc.directory.erb b/templates/torrc.directory.erb index 2eaffb7..d70ab39 100644 --- a/templates/torrc.directory.erb +++ b/templates/torrc.directory.erb @@ -2,9 +2,6 @@ <% if @port != '0' -%> DirPort <%= @port %> <% end -%> -<% Array(listen_addresses).each do |listen_address| -%> -DirListenAddress <%= listen_address %> -<% end -%> <% if @port_front_page != '' -%> DirPortFrontPage <%= @port_front_page %> <%- end -%> diff --git a/templates/torrc.dns.erb b/templates/torrc.dns.erb index 2b9ff8e..a89ba31 100644 --- a/templates/torrc.dns.erb +++ b/templates/torrc.dns.erb @@ -1,5 +1,2 @@ # DNS DNSPort <%= @port %> -<% Array(@listen_addresses).each do |listen_address| -%> -DNSListenAddress <%= listen_address %> -<% end -%> diff --git a/templates/torrc.relay.erb b/templates/torrc.relay.erb index bfe982c..27e35d6 100644 --- a/templates/torrc.relay.erb +++ b/templates/torrc.relay.erb @@ -1,8 +1,6 @@ # relay <% if @port != 0 -%> ORPort <%= @port %> -<% Array(@listen_addresses).each do |listen_address| -%> -ORListenAddress <%= @listen_address %> <% end -%> <% Array(@real_outbound_bindaddresses).each do |outbound_bindaddress| -%> OutboundBindAddress <%= @outbound_bindaddress %> diff --git a/templates/torrc.socks.erb b/templates/torrc.socks.erb index 09e13ae..c6aba60 100644 --- a/templates/torrc.socks.erb +++ b/templates/torrc.socks.erb @@ -1,8 +1,5 @@ # socks SocksPort <%= @port %> -<% Array(@listen_addresses).each do |listen_address| -%> -SocksListenAddress <%= listen_address %> -<% end -%> <% Array(@policies).each do |policy| -%> SocksPolicy <%= policy %> <% end -%> diff --git a/templates/torrc.transparent.erb b/templates/torrc.transparent.erb index 19a40e1..c57d138 100644 --- a/templates/torrc.transparent.erb +++ b/templates/torrc.transparent.erb @@ -1,5 +1,2 @@ # Transparent proxy TransPort <%= @port %> -<% Array(@listen_addresses).each do |listen_address| -%> -TransListenAddress <%= listen_address %> -<% end -%> -- cgit v1.2.3