feat: add v3 tor hidden service support
authorMicah Anderson <micah@riseup.net>
Sat, 7 Oct 2017 17:50:55 +0000 (13:50 -0400)
committerMicah Anderson <micah@riseup.net>
Sat, 7 Oct 2017 18:12:16 +0000 (14:12 -0400)
Resolves: #8879

provider_base/services/tor_hidden_service.json
puppet/modules/site_static/manifests/hidden_service.pp
puppet/modules/site_static/manifests/init.pp
puppet/modules/site_webapp/manifests/hidden_service.pp

index 137932f..d7f3ec2 100644 (file)
@@ -5,7 +5,8 @@
       "public_key": "= tor_public_key_path(:node_tor_pub_key, tor.hidden_service.key_type)",
       "private_key": "= tor_private_key_path(:node_tor_priv_key, tor.hidden_service.key_type)",
       "address": "=> onion_address(:node_tor_pub_key)",
-      "single_hop": false
+      "single_hop": false,
+      "v3": false
     }
   }
 }
index f23727f..c5d12c3 100644 (file)
@@ -1,11 +1,12 @@
 # create hidden service for static sites
-class site_static::hidden_service ( $single_hop = false ) {
+class site_static::hidden_service ( $single_hop = false, $v3 = false ) {
   Class['site_tor::hidden_service'] -> Class['site_static::hidden_service']
   include site_tor::hidden_service
 
   tor::daemon::hidden_service { 'static':
     ports      => [ '80 127.0.0.1:80'],
-    single_hop => $single_hop
+    single_hop => $single_hop,
+    v3         => $v3
   }
 
   file {
index 40c6a28..fdc5782 100644 (file)
@@ -60,10 +60,8 @@ class site_static {
   include site_config::ruby::dev
 
   if (member($formats, 'rack')) {
-    include site_apt::preferences::passenger
     class { 'passenger':
       manage_munin => false,
-      require      => Class['site_apt::preferences::passenger']
     }
   }
 
@@ -81,7 +79,8 @@ class site_static {
     $hidden_service = $tor['hidden_service']
     $onion_domain     = "${hidden_service['address']}.onion"
     class { 'site_static::hidden_service':
-      single_hop => $hidden_service['single_hop']
+      single_hop => $hidden_service['single_hop'],
+      v3         => $hidden_service['v3']
     }
 
     # Currently, we only support a single hidden service address per server.
index 1f87da6..290f966 100644 (file)
@@ -14,7 +14,8 @@ class site_webapp::hidden_service {
 
   tor::daemon::hidden_service { 'webapp':
     ports      => [ '80 127.0.0.1:80'],
-    single_hop => $hidden_service['single_hop']
+    single_hop => $hidden_service['single_hop'],
+    v3         => $hidden_service['v3']
   }
 
   file {