Documentation ¶
Index ¶
- func NewTLSCertificate(host string, priv *ecdsa.PrivateKey) ([]byte, error)
- func SignerFilename(signer string) string
- type Blacklist
- type KeyStore
- type LocalNetDbImpl
- type NetDbProvider
- type Peer
- type Reseeder
- type ReseederImpl
- type Server
- func (srv *Server) ListenAndServe() error
- func (srv *Server) ListenAndServeOnion(startConf *tor.StartConf, listenConf *tor.ListenConf) error
- func (srv *Server) ListenAndServeOnionTLS(startConf *tor.StartConf, listenConf *tor.ListenConf, certFile, keyFile string) error
- func (srv *Server) ListenAndServeTLS(certFile, keyFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTLSCertificate ¶
func NewTLSCertificate(host string, priv *ecdsa.PrivateKey) ([]byte, error)
func SignerFilename ¶
Types ¶
type Blacklist ¶
type Blacklist struct {
// contains filtered or unexported fields
}
func NewBlacklist ¶
func NewBlacklist() *Blacklist
type KeyStore ¶
type KeyStore struct {
Path string
}
func (*KeyStore) ReseederCertificate ¶
func (ks *KeyStore) ReseederCertificate(signer []byte) (*x509.Certificate, error)
type LocalNetDbImpl ¶
type LocalNetDbImpl struct {
Path string
}
func NewLocalNetDb ¶
func NewLocalNetDb(path string) *LocalNetDbImpl
func (*LocalNetDbImpl) RouterInfos ¶
func (db *LocalNetDbImpl) RouterInfos() (routerInfos []routerInfo, err error)
type NetDbProvider ¶
type NetDbProvider interface { // Get all router infos RouterInfos() ([]routerInfo, error) }
type ReseederImpl ¶
type ReseederImpl struct { SigningKey *rsa.PrivateKey SignerID []byte NumRi int RebuildInterval time.Duration NumSu3 int // contains filtered or unexported fields }
func NewReseeder ¶
func NewReseeder(netdb NetDbProvider) *ReseederImpl
func (*ReseederImpl) PeerSu3Bytes ¶
func (rs *ReseederImpl) PeerSu3Bytes(peer Peer) ([]byte, error)
func (*ReseederImpl) Start ¶
func (rs *ReseederImpl) Start() chan bool
type Server ¶
type Server struct { *http.Server Reseeder Reseeder Blacklist *Blacklist OnionListener *tor.OnionService }
func (*Server) ListenAndServe ¶
func (*Server) ListenAndServeOnion ¶
func (*Server) ListenAndServeOnionTLS ¶
func (*Server) ListenAndServeTLS ¶
Click to show internal directories.
Click to hide internal directories.