Documentation
¶
Overview ¶
Package introquery is an onion message that verifies a relay is an introducer for a given hidden service, returning its intro.Ad.
After receiving this message if the intro is valid a client can use a route message to start a connection.
Index ¶
- Constants
- func Gen() codec.Codec
- func New(id nonce.ID, hsk *crypto.Pub, exit *exit.ExitPoint) ont.Onion
- type IntroQuery
- func (x *IntroQuery) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
- func (x *IntroQuery) Decode(s *splice.Splice) (e error)
- func (x *IntroQuery) Encode(s *splice.Splice) (e error)
- func (x *IntroQuery) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)
- func (x *IntroQuery) Len() int
- func (x *IntroQuery) Magic() string
- func (x *IntroQuery) Unwrap() interface{}
- func (x *IntroQuery) Wrap(inner ont.Onion)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IntroQuery ¶
type IntroQuery struct { ID nonce.ID // 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 // Key is the public key of the hidden service. Key *crypto.Pub // Onion contained in Introquery should be a RoutingHeader and cipher/nonce set. ont.Onion }
IntroQuery is a query message to return the Intro for a given hidden service key.
func (*IntroQuery) Account ¶
func (x *IntroQuery) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
Account for an Introquery. In this case just the bytes size.
func (*IntroQuery) Decode ¶
func (x *IntroQuery) Decode(s *splice.Splice) (e error)
Decode what should be an IntroQuery message from a splice.Splice.
func (*IntroQuery) Encode ¶
func (x *IntroQuery) Encode(s *splice.Splice) (e error)
Encode this IntroQuery into a splice.Splice's next bytes.
func (*IntroQuery) Handle ¶
Handle provides the relay switching logic for an engine handling an Introquery message.
func (*IntroQuery) Len ¶
func (x *IntroQuery) Len() int
Len returns the length of the onion starting from this one (used to size a Splice).
func (*IntroQuery) Magic ¶
func (x *IntroQuery) Magic() string
Magic bytes identifying a HiddenService message is up next.
func (*IntroQuery) Unwrap ¶
func (x *IntroQuery) Unwrap() interface{}
Unwrap returns the onion inside this IntroQuery message.
func (*IntroQuery) Wrap ¶
func (x *IntroQuery) Wrap(inner ont.Onion)
Wrap places another onion inside this one in its slot.