introquery

package
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2023 License: Unlicense Imports: 17 Imported by: 0

Documentation

Overview

Package introquery is an onion message that verifies a relay is an introducer for a given hidden service, returning its adintro.Ad.

After receiving this message if the intro is valid a client can use a route message to start a connection.

Index

Constants

View Source
const (
	IntroQueryMagic = "intq"
	IntroQueryLen   = magic.Len + nonce.IDLen + crypto.PubKeyLen +
		3*sha256.Len + nonce.IVLen*3
)

Variables

This section is empty.

Functions

func NewIntroQuery

func NewIntroQuery(id nonce.ID, hsk *crypto.Pub, exit *exit.ExitPoint) ont.Onion

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
	// Port identifies the type of service as well as being the port used by
	// the service to be relayed to. Notice there is no IP address, this is
	// because Indranet only forwards to exits of decentralised services
	// also running on the same machine. This service could be a proxy, of
	// course, if configured this way. This could be done by tunneling from
	// a local Socks5 proxy into Indranet and the exit node also having
	// this.
	Key *crypto.Pub
	ont.Onion
}

func (*IntroQuery) Account

func (x *IntroQuery) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)

func (*IntroQuery) Decode

func (x *IntroQuery) Decode(s *splice.Splice) (e error)

func (*IntroQuery) Encode

func (x *IntroQuery) Encode(s *splice.Splice) (e error)

func (*IntroQuery) GetOnion

func (x *IntroQuery) GetOnion() interface{}

func (*IntroQuery) Handle

func (x *IntroQuery) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)

func (*IntroQuery) Len

func (x *IntroQuery) Len() int

func (*IntroQuery) Magic

func (x *IntroQuery) Magic() string

func (*IntroQuery) Wrap

func (x *IntroQuery) Wrap(inner ont.Onion)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL