client: github.com/katzenpost/client/config Index | Files

package config

import "github.com/katzenpost/client/config"

Package config implements the configuration for the Katzenpost client.

Index

Package Files

config.go

type Account Uses

type Account struct {
    // Provider is the provider identifier used by this account.
    Provider string

    // ProviderKeyPin is the optional pinned provider signing key.
    ProviderKeyPin *eddsa.PublicKey
}

Account is a provider account configuration.

type Config Uses

type Config struct {
    Logging            *Logging
    UpstreamProxy      *UpstreamProxy
    Debug              *Debug
    NonvotingAuthority *NonvotingAuthority
    VotingAuthority    *VotingAuthority
    Account            *Account
    Registration       *Registration
    Panda              *Panda
    // contains filtered or unexported fields
}

Config is the top level client configuration.

func Load Uses

func Load(b []byte) (*Config, error)

Load parses and validates the provided buffer b as a config file body and returns the Config.

func LoadFile Uses

func LoadFile(f string) (*Config, error)

LoadFile loads, parses, and validates the provided file and returns the Config.

func (*Config) FixupAndValidate Uses

func (c *Config) FixupAndValidate() error

FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.

func (*Config) NewPKIClient Uses

func (c *Config) NewPKIClient(l *log.Backend, pCfg *proxy.Config) (pki.Client, error)

NewPKIClient returns a voting or nonvoting implementation of pki.Client or error

func (*Config) UpstreamProxyConfig Uses

func (c *Config) UpstreamProxyConfig() *proxy.Config

UpstreamProxyConfig returns the configured upstream proxy, suitable for internal use. Most people should not use this.

type Debug Uses

type Debug struct {
    DisableDecoyLoops bool

    // SessionDialTimeout is the number of seconds that a session dial
    // is allowed to take until it is cancelled.
    SessionDialTimeout int

    // InitialMaxPKIRetrievalDelay is the initial maximum number of seconds
    // we are willing to wait for the retreival of the PKI document.
    InitialMaxPKIRetrievalDelay int

    // CaseSensitiveUserIdentifiers disables the forced lower casing of
    // the Account `User` field.
    CaseSensitiveUserIdentifiers bool

    // PollingInterval is the interval in seconds that will be used to
    // poll the receive queue.  By default this is 30 seconds.  Reducing
    // the value too far WILL result in uneccesary Provider load, and
    // increasing the value too far WILL adversely affect large message
    // transmit performance.
    PollingInterval int
}

Debug is the debug configuration.

type Logging Uses

type Logging struct {
    // Disable disables logging entirely.
    Disable bool

    // File specifies the log file, if omitted stdout will be used.
    File string

    // Level specifies the log level.
    Level string
}

Logging is the logging configuration.

type NonvotingAuthority Uses

type NonvotingAuthority struct {
    // Address is the IP address/port combination of the authority.
    Address string

    // PublicKey is the authority's public key.
    PublicKey *eddsa.PublicKey
}

NonvotingAuthority is a non-voting authority configuration.

func (*NonvotingAuthority) New Uses

func (nvACfg *NonvotingAuthority) New(l *log.Backend, pCfg *proxy.Config) (pki.Client, error)

New constructs a pki.Client with the specified non-voting authority config.

type Panda Uses

type Panda struct {
    // Receiver is the recipient ID that shall receive the Sphinx packets destined
    // for this PANDA service.
    Receiver string
    // Provider is the Provider on this mix network which is hosting this PANDA service.
    Provider string
    // BlobSize is the size of the PANDA blobs that clients will use.
    BlobSize int
}

Panda is the PANDA configuration needed by clients in order to use the PANDA service

type Registration Uses

type Registration struct {
    Address string
    Options *registration.Options
}

Registration is used for the client's Provider account registration.

type UpstreamProxy Uses

type UpstreamProxy struct {
    // Type is the proxy type (Eg: "none"," socks5").
    Type string

    // Network is the proxy address' network (`unix`, `tcp`).
    Network string

    // Address is the proxy's address.
    Address string

    // User is the optional proxy username.
    User string

    // Password is the optional proxy password.
    Password string
}

UpstreamProxy is the outgoing connection proxy configuration.

type VotingAuthority Uses

type VotingAuthority struct {
    Peers []*vServerConfig.AuthorityPeer
}

VotingAuthority is a voting authority configuration.

func (*VotingAuthority) New Uses

func (vACfg *VotingAuthority) New(l *log.Backend, pCfg *proxy.Config) (pki.Client, error)

New constructs a pki.Client with the specified non-voting authority config.

Package config imports 14 packages (graph) and is imported by 5 packages. Updated 2019-05-13. Refresh now. Tools for package owners.