]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
-a -m Adding onion classes
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Jul 2012 14:18:20 +0000 (11:18 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Jul 2012 14:18:20 +0000 (11:18 -0300)
manifests/init.pp
manifests/subsystems/onion.pp [new file with mode: 0644]

index 79f47e23b7cad62091560a46bed2cd05bd6f3fa9..280cdce0cfa73680412246b5805484130d5cf813 100644 (file)
@@ -70,6 +70,7 @@ import "subsystems/gdm.pp"
 import "subsystems/modprobe.pp"
 import "subsystems/hosts.pp"
 import "subsystems/locales.pp"
+import "subsystems/onion.pp"
 import "subsystems/tunnel.pp"
 import "subsystems/monkeysphere.pp"
 import "subsystems/profile.pp"
diff --git a/manifests/subsystems/onion.pp b/manifests/subsystems/onion.pp
new file mode 100644 (file)
index 0000000..85ec4da
--- /dev/null
@@ -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',
+  }
+}