blob: b6e73a23d55340cb62b26b7f3f272c4df1c87828 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
class site_tor {
tag 'leap_service'
Class['site_config::default'] -> Class['site_tor']
$tor = hiera('tor')
$bandwidth_rate = $tor['bandwidth_rate']
$tor_type = $tor['type']
$nickname = $tor['nickname']
$contact_emails = join($tor['contacts'],', ')
$address = hiera('ip_address')
class { 'tor::daemon': }
tor::daemon::relay { $nickname:
port => 9001,
address => $address,
contact_info => obfuscate_email($contact_emails),
bandwidth_rate => $bandwidth_rate,
my_family => '$2A431444756B0E7228A7918C85A8DACFF7E3B050',
}
tor::daemon::directory { $::hostname: port => 80 }
include site_shorewall::tor
if ( $tor_type != 'exit' ) {
include site_tor::disable_exit
}
}
|