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 Config ¶
type Config struct {
RatchetNIKEScheme string
WireKEMScheme string
PKISignatureScheme string
SphinxGeometry *geo.Geometry
Logging *Logging
UpstreamProxy *UpstreamProxy
Debug *Debug
VotingAuthority *VotingAuthority
// 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) FixupAndValidate ¶
FixupAndValidate applies defaults to config entries and validates the configuration sections.
func (*Config) NewPKIClient ¶
func (c *Config) NewPKIClient(l *log.Backend, pCfg *proxy.Config, linkKey kem.PrivateKey, mygeo *geo.Geometry) (pki.Client, error)
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
// 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 []string
}
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 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.Authority
}
VotingAuthority is a voting authority configuration.