aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/daemon.pp1
-rw-r--r--templates/torrc.exit_policy.erb3
2 files changed, 4 insertions, 0 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index 73014b3..173e565 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -174,6 +174,7 @@ class tor::daemon inherits tor {
# exit policies
define exit_policy( $accept = [],
$reject = [],
+ $reject_private = 1,
$ensure = present ) {
concatenated_file_part { "07.exit_policy.${name}":
diff --git a/templates/torrc.exit_policy.erb b/templates/torrc.exit_policy.erb
index 4732ad6..92367c2 100644
--- a/templates/torrc.exit_policy.erb
+++ b/templates/torrc.exit_policy.erb
@@ -1,4 +1,7 @@
# exit policies: <%= name %>
+<%- if reject_private != 1 then -%>
+ExitPolicyRejectPrivate <%= reject_private %>
+<%- end -%>
<%- for policy in accept -%>
ExitPolicy accept <%= policy %>
<%- end -%>