aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/onion.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-07-20 11:18:20 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-07-20 11:18:20 -0300
commit3b9b663da41c885aa133706eb47bfd3b1eec812f (patch)
treea9c67d28c7fb5eb09b4778a35685937526f4a375 /manifests/subsystems/onion.pp
parentfb23e633eef960e32ac70751472e9348e65ad847 (diff)
downloadpuppet-nodo-3b9b663da41c885aa133706eb47bfd3b1eec812f.tar.gz
puppet-nodo-3b9b663da41c885aa133706eb47bfd3b1eec812f.tar.bz2
-a -m Adding onion classes
Diffstat (limited to 'manifests/subsystems/onion.pp')
-rw-r--r--manifests/subsystems/onion.pp35
1 files changed, 35 insertions, 0 deletions
diff --git a/manifests/subsystems/onion.pp b/manifests/subsystems/onion.pp
new file mode 100644
index 0000000..85ec4da
--- /dev/null
+++ b/manifests/subsystems/onion.pp
@@ -0,0 +1,35 @@
+class onion {
+ include tor::daemon
+
+ # It's important to use a subdir from the tor datadir
+ # to ease backup/restore procedures as we don't mix
+ # hidden service data with other tor files.
+ if !defined(File["$tor::daemon::data_dir/hidden"]) {
+ file { "$tor::daemon::data_dir/hidden":
+ ensure => directory,
+ owner => 'debian-tor',
+ group => 'debian-tor',
+ mode => 0700,
+ }
+ }
+}
+
+class onion::socks inherits tor::daemon {
+ # Default tor daemon configuration
+ tor::daemon::socks { 'socks':
+ port => 9050,
+ listen_addresses => [ '127.0.0.1' ],
+ }
+}
+
+class onion::freenode inherits tor::daemon {
+ # Freenode via Tor
+ # http://freenode.net/irc_servers.shtml
+ # http://pthree.org/2010/01/31/freenode-ssl-and-sasl-authentication-with-irssi/
+ # http://freenode.net/sasl/sasl-irssi.shtml
+ # https://wiki.archlinux.org/index.php/Tor
+ tor::daemon::map_address { 'freenode':
+ address => '10.40.40.40',
+ newaddress => 'p4fsi4ockecnea7l.onion',
+ }
+}