propellor-5.10.1: property-based host configuration management in haskell

Safe Haskell | None
Language | Haskell98

Propellor.Property.Tor

Synopsis

- type HiddenServiceName = String
- type NodeName = String
- isBridge :: Property DebianLike
- isRelay :: Property DebianLike
- named :: NodeName -> Property (HasInfo + DebianLike)
- torPrivKey :: Context -> Property (HasInfo + DebianLike)
- torPrivKeyDirExists :: Property DebianLike
- torPrivKeyDir :: FilePath
- server :: Property DebianLike
- installed :: Property DebianLike
- configured :: [(String, String)] -> Property DebianLike
- data BwLimit
  - = PerSecond String
  - | PerDay String
  - | PerMonth String
- bandwidthRate :: BwLimit -> Property DebianLike
- bandwidthRate' :: String -> Integer -> Property DebianLike
- hiddenService :: HiddenServiceName -> Port -> Property DebianLike
- hiddenService' :: HiddenServiceName -> [Port] -> Property DebianLike
- hiddenServiceAvailable :: HiddenServiceName -> Port -> Property DebianLike
- hiddenServiceAvailable' :: HiddenServiceName -> [Port] -> Property DebianLike
- hiddenServiceData :: IsContext c => HiddenServiceName -> c -> Property (HasInfo + DebianLike)
- restarted :: Property DebianLike
- mainConfig :: FilePath
- varLib :: FilePath
- varRun :: FilePath
- user :: User
- type NickName = String
- saneNickname :: String -> NickName

# Documentation

type HiddenServiceName = String Source #

type NodeName = String Source #

isBridge :: Property DebianLike Source #

Sets up a tor bridge. (Not a relay or exit node.)

Uses port 443

isRelay :: Property DebianLike Source #

Sets up a tor relay.

Uses port 443

named :: NodeName -> Property (HasInfo + DebianLike) Source #

Makes the tor node be named, with a known private key.

This can be moved to a different IP without needing to wait to accumulate trust.

torPrivKey :: Context -> Property (HasInfo + DebianLike) Source #

Configures tor with secret_id_key, ed25519_master_id_public_key, and ed25519_master_id_secret_key from privdata.

torPrivKeyDirExists :: Property DebianLike Source #

torPrivKeyDir :: FilePath Source #

server :: Property DebianLike Source #

A tor server (bridge, relay, or exit) Don't use if you just want to run tor for personal use.

installed :: Property DebianLike Source #

configured :: [(String, String)] -> Property DebianLike Source #

Specifies configuration settings. Any lines in the config file that set other values for the specified settings will be removed, while other settings are left as-is. Tor is restarted when configuration is changed.

data BwLimit Source #

Constructors

PerSecond String |
PerDay String |
PerMonth String |

bandwidthRate :: BwLimit -> Property DebianLike Source #

Limit incoming and outgoing traffic to the specified amount each.

For example, PerSecond "30 kibibytes" is the minimum limit for a useful relay.

bandwidthRate' :: String -> Integer -> Property DebianLike Source #

hiddenService :: HiddenServiceName -> Port -> Property DebianLike Source #

Enables a hidden service for a given port.

If used without `hiddenServiceData`, tor will generate a new private key.

hiddenService' :: HiddenServiceName -> [Port] -> Property DebianLike Source #

hiddenServiceAvailable :: HiddenServiceName -> Port -> Property DebianLike Source #

Same as `hiddenService` but also causes propellor to display the onion address of the hidden service.

hiddenServiceAvailable' :: HiddenServiceName -> [Port] -> Property DebianLike Source #

hiddenServiceData :: IsContext c => HiddenServiceName -> c -> Property (HasInfo + DebianLike) Source #

Load the private key for a hidden service from the privdata.

restarted :: Property DebianLike Source #

mainConfig :: FilePath Source #

varLib :: FilePath Source #

varRun :: FilePath Source #

user :: User Source #

type NickName = String Source #

saneNickname :: String -> NickName Source #

Convert String to a valid tor NickName.