Documentation
¶
Overview ¶
Package config implements the configuration for the Katzenpost client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// User is the account user name.
User string
// 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 ¶
type Config struct {
Logging *Logging
UpstreamProxy *UpstreamProxy
Debug *Debug
NonvotingAuthority *NonvotingAuthority
VotingAuthority *VotingAuthority
Account *Account
Registration *Registration
Panda *Panda
Reunion *Reunion
// contains filtered or unexported fields
}
Config is the top level client configuration.
func Load ¶
Load parses and validates the provided buffer b as a config file body and returns the Config.
func (*Config) FixupAndMinimallyValidate ¶ added in v0.0.3
FixupAndMinimallyValidate applies defaults to config entries and validates the all but the Account and Registration configuration sections.
func (*Config) FixupAndValidate ¶
FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.
func (*Config) NewPKIClient ¶
NewPKIClient returns a voting or nonvoting implementation of pki.Client or error
func (*Config) UpstreamProxyConfig ¶
UpstreamProxyConfig returns the configured upstream proxy, suitable for internal use. Most people should not use this.
type Debug ¶
type Debug struct {
DisableDecoyTraffic bool
// SessionDialTimeout is the number of seconds that a session dial
// is allowed to take until it is canceled.
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 10 seconds. Reducing
// the value too far WILL result in unnecessary Provider load, and
// increasing the value too far WILL adversely affect large message
// transmit performance.
PollingInterval int
// PreferedTransports is a list of the transports will be used to make
// outgoing network connections, with the most prefered first.
PreferedTransports []pki.Transport
}
Debug is the debug configuration.
type Logging ¶
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 ¶
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.
type Panda ¶
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 ¶
type Registration struct {
Address string
Options *registration.Options
}
Registration is used for the client's Provider account registration.
type Reunion ¶ added in v0.0.8
type Reunion struct {
// Enable indicates that the reunion protocol should be used
Enable bool
}
Reunion is the Reunion configuration needed by clients in order to use the Reunion service
type UpstreamProxy ¶
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 ¶
type VotingAuthority struct {
Peers []*vServerConfig.AuthorityPeer
}
VotingAuthority is a voting authority configuration.