Forge Home

tor

Installs, configures and manages Tor

13,266 downloads

83 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 4.1.1 (latest)
  • 4.1.0
  • 4.0.0
  • 3.2.0
  • 3.1.1
  • 3.1.0
  • 3.0.0
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Jul 21st 2024
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.0 < 8.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'smash-tor', '4.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add smash-tor
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install smash-tor --version 4.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

smash/tor — version 4.1.1 Jul 21st 2024

tor

Table of Contents

  1. Description
  2. Setup
  3. Functions
  4. Facts
  5. Reference
  6. Development

Description

This module manages tor and is mainly geared towards people running it on servers. With this module, you should be able to manage most, if not all of the functionalities provided by tor, such as:

  • relays
  • bridges and exit nodes
  • onion services
  • exit policies
  • transport plugins

Setup

Setup Requirements

This module needs:

Explicit dependencies can be found in the project's metadata.json file.

Getting started

class { 'tor': } will install tor with a default configuration. Chances are you will want to configure Tor in a certain way. This is accomplished declaring one or more of the tor::daemon defined types.

For example, this will configure a tor bridge relay running on port 8080:

  tor::daemon::relay {
    'MyNickname':
      bridge_relay     => true,
      port             => 8080,
      address          => '1.1.1.1',
      bandwidth_rate   => 12500,
      bandwidth_burst  => 12500,
      contact_info     => 'Foo Bar <foo@bar.com>',
  }

There are many more such snippets available in tor::daemon, for example, this will create a hidden service for the SSH daemon:

tor::daemon::onion_service { 'onion-ssh':
    ports => [ '22' ],
}

See the manifests/daemon directory for more examples.

Functions

This module comes with functions specific to tor support. They require the base32, ed25519 and sha3 gem to be installed on the master or wherever they are executed. For JRuby based installations such as puppetserver environments you can use the sha3-pure-ruby instead of the C based library.

onionv3_key

This functions generates an onion v3 key pair if not already existing. As arguments, you need to pass a base directory and an identifier (name) of the key. The key pair will be looked up in a directory under <base_dir>/<name>.

As a result you will get a hash containing they secret key (hs_ed25519_secret_key), the public key (hs_ed25519_public_key) and the onion hostname (hostname). The latter will be without the .onion suffix.

If a key has already been created and exists under that directory, the content of these files will be returned.

Note that an easier way to use this function is to call tor::daemon::onion_service instead, as that will also take care of adding configuration to the Tor daemon.

Facts

tor_hidden_services

This fact gives you a list of the hidden services you are running.

Reference

The full reference documentation for this module may be found at on GitLab Pages.

Alternatively, you may build yourself the documentation using the puppet strings generate command. See the documentation for Puppet Strings for more information.

Development

This module's development is tracked on GitLab. Please submit issues and merge requests on the shared-puppet-modules-group/tor project page.