aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-06-19 04:02:13 +0200
committerintrigeri <intrigeri@boum.org>2012-06-19 05:22:44 +0200
commitebee9da1b3883461b18f9aae86663002195e94e7 (patch)
tree7dd3b80c12fcf03e2a74a4eb8890aec8b4dfd241
parentf12bf2ae954aeabb0c75d52801158238931ca0ae (diff)
downloadpuppet-tor-ebee9da1b3883461b18f9aae86663002195e94e7.tar.gz
puppet-tor-ebee9da1b3883461b18f9aae86663002195e94e7.tar.bz2
Add support for TransPort and TransListenAddress.
-rw-r--r--manifests/daemon.pp13
-rw-r--r--templates/torrc.transparent.erb5
2 files changed, 18 insertions, 0 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index ac8529c..0778bce 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -204,5 +204,18 @@ class tor::daemon inherits tor {
}
}
+ # Transparent proxy definition
+ define transparent( $port = 0,
+ $listen_addresses = [],
+ $ensure = present ) {
+
+ concatenated_file_part { "09.transparent.${name}":
+ dir => $tor::daemon::snippet_dir,
+ content => template('tor/torrc.transparent.erb'),
+ owner => 'debian-tor', group => 'debian-tor', mode => 0644,
+ ensure => $ensure,
+ }
+ }
+
}
diff --git a/templates/torrc.transparent.erb b/templates/torrc.transparent.erb
new file mode 100644
index 0000000..dae97dc
--- /dev/null
+++ b/templates/torrc.transparent.erb
@@ -0,0 +1,5 @@
+# Transparent proxy
+TransPort <%= port %>
+<%- for listen_address in listen_addresses -%>
+TransListenAddress <%= listen_address %>
+<%- end -%>