Documentation ¶
Index ¶
- Variables
- func ContentPath() (string, error)
- func HandleAFile(w http.ResponseWriter, dirPath, file string)
- func HandleALocalizedFile(w http.ResponseWriter, dirPath string)
- func NewTLSCertificate(host string, priv *ecdsa.PrivateKey) ([]byte, error)
- func SecureRandomAlphaString() string
- func SecureRandomBytes(length int) []byte
- func SignerFilename(signer string) string
- type Blacklist
- type KeyStore
- type LocalNetDbImpl
- type Peer
- type ReseederImpl
- type Server
- func (srv *Server) Acceptable() string
- func (srv *Server) CheckAcceptable(val string) bool
- func (srv *Server) HandleARealBrowser(w http.ResponseWriter, r *http.Request)
- func (srv *Server) ListenAndServe() error
- func (srv *Server) ListenAndServeI2P(samaddr string, I2PKeys i2pkeys.I2PKeys) error
- func (srv *Server) ListenAndServeI2PTLS(samaddr string, I2PKeys i2pkeys.I2PKeys, certFile, keyFile string) error
- func (srv *Server) ListenAndServeLibP2P(hst host.Host) 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 ¶
View Source
var BaseContentPath, ContentPathError = ContentPath()
View Source
var CachedDataPages = map[string][]byte{}
View Source
var CachedLanguagePages = map[string]string{}
View Source
var SupportedLanguages = []language.Tag{ language.English, }
Functions ¶
func ContentPath ¶
func HandleAFile ¶
func HandleAFile(w http.ResponseWriter, dirPath, file string)
func HandleALocalizedFile ¶
func HandleALocalizedFile(w http.ResponseWriter, dirPath string)
func NewTLSCertificate ¶
func NewTLSCertificate(host string, priv *ecdsa.PrivateKey) ([]byte, error)
func SecureRandomAlphaString ¶ added in v0.0.8
func SecureRandomAlphaString() string
func SecureRandomBytes ¶ added in v0.0.8
SecureRandomBytes returns the requested number of bytes using crypto/rand
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 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 *LocalNetDbImpl) *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 I2P *sam3.SAM I2PSession *sam3.StreamSession I2PListener *sam3.StreamListener I2PKeys i2pkeys.I2PKeys Reseeder *ReseederImpl Blacklist *Blacklist OnionListener *tor.OnionService // contains filtered or unexported fields }
func (*Server) Acceptable ¶ added in v0.0.8
func (*Server) CheckAcceptable ¶ added in v0.0.8
func (*Server) HandleARealBrowser ¶ added in v0.0.8
func (srv *Server) HandleARealBrowser(w http.ResponseWriter, r *http.Request)
func (*Server) ListenAndServe ¶
func (*Server) ListenAndServeI2P ¶
func (*Server) ListenAndServeI2PTLS ¶
func (*Server) ListenAndServeLibP2P ¶
ListenAndServeLibP2P is used to serve the reseed server over libp2p http connections
func (*Server) ListenAndServeOnion ¶
func (*Server) ListenAndServeOnionTLS ¶
func (*Server) ListenAndServeTLS ¶
Click to show internal directories.
Click to hide internal directories.