aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2012-01-06 17:39:40 -0200
committerdrebs <drebs@riseup.net>2012-01-06 17:39:40 -0200
commit606e8241b80d14c8d0be414ae1690618edb7e060 (patch)
treea98067df59629324aaa0b00f59d9e7263383f3d7
parent33fc2cb106b6798a64c868bc91a5b4d50c20c86a (diff)
downloadpuppet-tor-606e8241b80d14c8d0be414ae1690618edb7e060.tar.gz
puppet-tor-606e8241b80d14c8d0be414ae1690618edb7e060.tar.bz2
adding config files for normal and bridge relays
-rw-r--r--files/torrc-bridge4
-rw-r--r--templates/torrc.erb84
2 files changed, 88 insertions, 0 deletions
diff --git a/files/torrc-bridge b/files/torrc-bridge
new file mode 100644
index 0000000..a10de52
--- /dev/null
+++ b/files/torrc-bridge
@@ -0,0 +1,4 @@
+SocksPort 0
+ORPort 443
+BridgeRelay 1
+Exitpolicy reject *:*
diff --git a/templates/torrc.erb b/templates/torrc.erb
new file mode 100644
index 0000000..0aac59f
--- /dev/null
+++ b/templates/torrc.erb
@@ -0,0 +1,84 @@
+## This file is managed by puppet.
+
+## socks
+<%- if socks_port then %>
+SocksPort <%= socks_port %>
+<%- end %>
+<%- for address in socks_listen_address %>
+SocksListenAddress <%= address %>
+<%- end %>
+<%- for policy in socks_policies %>
+SocksPolicy <%= policy %>
+<%- end %>
+
+## log
+<%- if log_file then %>
+Log notice file <%= log_file %>
+<%- else %>
+Log notice syslog
+<%- end %>
+
+## runtime
+RunAsDaemon 1
+DataDirectory <%= tor_data_directory %>
+
+## tor controller
+<%- if control_port %>
+ControlPort <%= control_port %>
+HashedControlPassword <%= hashed_control_password %>
+<%- end %>
+
+## hidden services
+<%- for service in hidden_services %>
+HiddenServiceDir /var/tor/<%= service[:name] %>/<%= service[:dir] %>
+<%- for port in service[:ports] %>
+HiddenServicePort <%= port %>
+<%- end %>
+<%- end %>
+
+## relay
+<%- if or_port %>
+ORPort <%= or_port %>
+<%- end %>
+<%- if or_listen_address %>
+ORListenAddress <%= or_listen_address %>
+<%- end %>
+Nickname <%= nickname %>
+Address <%= hostname %>
+<%- if relay_bandwidth_limit then %>
+RelayBandwidthRate <% relay_bandwith_rate %> KB
+<%- end %>
+<%- if relay_bandwidth_burst then %>
+RelayBandwidthBurst <% relay_bandwith_burst %> KB
+<%- end %>
+<%- if accounting_max then %>
+AccountingMax <%= accounting_max %> GB
+<%- end %>
+<%- if accounting_start then %>
+AccountingStart <%= accounting_start %>
+<%- end %>
+<%- if contact_info then %>
+ContactInfo <%= contact_info %>
+<%- end %>
+
+## directory listing
+<%- if dir_port then %>
+DirPort <%= dir_port %>
+<%- end %>
+<%- if dir_listen_address then %>
+DirListenAddress 0.0.0.0:9091
+<%- end %>
+<%- if dir_port_front_page then %>
+DirPortFrontPage /etc/tor/tor-exit-notice.html
+<%- end %>
+
+## relay family
+<%- if my_family then %>
+MyFamily <%= my_family %>
+<%- end %>
+
+## exit policies
+<%- for policy in exit_policies %>
+ExitPolicy <%= policy %>
+<%- end %>
+