From f401daa245495233c3d86d5f955105be564e02b1 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 19 Jun 2012 04:07:31 +0200 Subject: Add support for using bridges. --- manifests/daemon.pp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'manifests/daemon.pp') diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 0778bce..2484edf 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -76,7 +76,8 @@ class tor::daemon inherits tor { # global configurations define global_opts( $data_dir = $tor::daemon::data_dir, - $log_rules = [ 'notice file /var/log/tor/notices.log' ] ) { + $log_rules = [ 'notice file /var/log/tor/notices.log' ], + $use_bridges = 0 ) { concatenated_file_part { '01.global': dir => $tor::daemon::snippet_dir, @@ -217,5 +218,19 @@ class tor::daemon inherits tor { } } + # Bridge definition + define bridge( $ip, + $port, + $fingerprint = false, + $ensure = present ) { + + concatenated_file_part { "10.bridge.${name}": + dir => $tor::daemon::snippet_dir, + content => template('tor/torrc.bridge.erb'), + owner => 'debian-tor', group => 'debian-tor', mode => 0644, + ensure => $ensure, + } + } + } -- cgit v1.2.3