exit

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: 18 Imported by: 0

Documentation

Overview

Package exit is an onion message type that contains a payload intended to be forwarded to the exit service of a relay.

Index

Constants

View Source
const (
	ExitMagic = "exit"
	ExitLen   = magic.Len +
		slice.Uint16Len +
		3*sha256.Len +
		slice.Uint32Len +
		nonce.IVLen*3 +
		nonce.IDLen
)

Variables

This section is empty.

Functions

func NewExit

func NewExit(id nonce.ID, port uint16, payload slice.Bytes,
	ep *ExitPoint) ont.Onion

Types

type Exit

type Exit 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.
	Port uint16
	// Bytes are the message to be passed to the exit service.
	slice.Bytes
	ont.Onion
}

func (*Exit) Account

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

func (*Exit) Decode

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

func (*Exit) Encode

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

func (*Exit) GetOnion

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

func (*Exit) Handle

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

func (*Exit) Len

func (x *Exit) Len() int

func (*Exit) Magic

func (x *Exit) Magic() string

func (*Exit) Wrap

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

type ExitParams

type ExitParams struct {
	Port       uint16
	Payload    slice.Bytes
	ID         nonce.ID
	Alice, Bob *sessions.Data
	S          sessions.Circuit
	KS         *crypto.KeySet
}

type ExitPoint

type ExitPoint struct {
	*Routing
	ReturnPubs crypto.Pubs
}

type Routing

type Routing struct {
	Sessions [3]*sessions.Data
	Keys     crypto.Privs
	crypto.Nonces
}

Jump to

Keyboard shortcuts

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