Documentation ¶
Overview ¶
Package hiddenservice provides a message type for hidden services to send to designated introducer relays.
These are a message type that does not go into a peer's ad bundle, they are simply gossiped when they are received, and will stop being gossiped after the expiry in the embedded intro message expiry is passed.
Of course a hidden service can decide to unilaterally stop sending these before this expiry for any reason, and each new client triggers the generation of a new intro, which is forwarded to the introducer after it performs an introduction with this data, but usually it will continue to give a new intro each time a client connects through until the expiry time.
Index ¶
- Constants
- func Gen() codec.Codec
- func New(in *intro.Ad, point *exit.ExitPoint) ont.Onion
- type HiddenService
- func (x *HiddenService) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
- func (x *HiddenService) Decode(s *splice.Splice) (e error)
- func (x *HiddenService) Encode(s *splice.Splice) (e error)
- func (x *HiddenService) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)
- func (x *HiddenService) Len() int
- func (x *HiddenService) Magic() string
- func (x *HiddenService) Unwrap() interface{}
- func (x *HiddenService) Wrap(inner ont.Onion)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HiddenService ¶
type HiddenService struct { // Intro of the hidden service. Intro intro.Ad // Ciphers is a set of 3 symmetric ciphers that are to be used in their // given order over the reply message from the service. crypto.Ciphers // Nonces are the nonces to use with the cipher when creating the encryption // for the reply message, they are common with the crypts in the header. crypto.Nonces hidden.RoutingHeaderBytes ont.Onion }
HiddenService is a message providing an Intro and the necessary Ciphers, Nonces and RoutingHeaderBytes to forward a Route message through to the hidden service, using the client's reply RoutingHeader.
func (*HiddenService) Account ¶
func (x *HiddenService) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
Account the traffic for the relay handling this message.
func (*HiddenService) Decode ¶
func (x *HiddenService) Decode(s *splice.Splice) (e error)
Decode the HiddenService message from the next bytes of a Splice.
func (*HiddenService) Encode ¶
func (x *HiddenService) Encode(s *splice.Splice) (e error)
Encode a HiddenService into a the next bytes of a Splice.
func (*HiddenService) Len ¶
func (x *HiddenService) Len() int
Len returns the length of the onion starting from this one (used to size a Splice).
func (*HiddenService) Magic ¶
func (x *HiddenService) Magic() string
Magic bytes identifying a HiddenService message is up next.
func (*HiddenService) Unwrap ¶
func (x *HiddenService) Unwrap() interface{}
Unwrap returns the inner onion or remaining parts of the message prototype.
func (*HiddenService) Wrap ¶
func (x *HiddenService) Wrap(inner ont.Onion)
Wrap places another onion inside this one in its slot.