hidden

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatReply

func FormatReply(header RoutingHeaderBytes, ciphers crypto.Ciphers,
	nonces crypto.Nonces, res slice.Bytes) (rb *splice.Splice)

func ReadRoutingHeader

func ReadRoutingHeader(s *splice.Splice, b *RoutingHeaderBytes) *splice.Splice

func WriteRoutingHeader

func WriteRoutingHeader(s *splice.Splice, b RoutingHeaderBytes) *splice.Splice

Types

type Hidden

type Hidden struct {
	sync.Mutex
	MyIntros
	KnownIntros
	Services
}

Hidden is a collection of data related to hidden services. Introductions both own and other, hidden services.

func NewHiddenrouting

func NewHiddenrouting() *Hidden

func (*Hidden) AddHiddenService

func (hr *Hidden) AddHiddenService(svc *services.Service, key *crypto.Prv,
	in *adintro.Ad, addr string)

func (*Hidden) AddIntro

func (hr *Hidden) AddIntro(pk *crypto.Pub, intro *Introduction)

func (*Hidden) AddIntroToHiddenService

func (hr *Hidden) AddIntroToHiddenService(key crypto.PubBytes, in *adintro.Ad)

func (*Hidden) Delete

func (hr *Hidden) Delete(key crypto.PubBytes) (header *Introduction)

func (*Hidden) DeleteIntroByID

func (hr *Hidden) DeleteIntroByID(id nonce.ID)

func (*Hidden) DeleteKnownIntro

func (hr *Hidden) DeleteKnownIntro(key crypto.PubBytes) (
	header *Introduction)

func (*Hidden) FindCloakedHiddenService

func (hr *Hidden) FindCloakedHiddenService(key crypto.CloakedPubKey) (
	pubKey *crypto.PubBytes)

func (*Hidden) FindHiddenService

func (hr *Hidden) FindHiddenService(key crypto.PubBytes) (
	hs *LocalHiddenService)

func (*Hidden) FindIntroduction

func (hr *Hidden) FindIntroduction(key crypto.PubBytes) (intro *Introduction)

func (*Hidden) FindIntroductionUnsafe

func (hr *Hidden) FindIntroductionUnsafe(
	key crypto.PubBytes) (intro *Introduction)

func (*Hidden) FindKnownIntro

func (hr *Hidden) FindKnownIntro(key crypto.PubBytes) (intro *adintro.Ad)

func (*Hidden) FindKnownIntroUnsafe

func (hr *Hidden) FindKnownIntroUnsafe(key crypto.PubBytes) (intro *adintro.Ad)

type Introduction

type Introduction struct {
	Intro *adintro.Ad
	ReplyHeader
}

type KnownIntros

type KnownIntros map[crypto.PubBytes]*adintro.Ad

type LocalHiddenService

type LocalHiddenService struct {
	Prv           *crypto.Prv
	CurrentIntros []*adintro.Ad
	*services.Service
}

type MyIntros

type MyIntros map[crypto.PubBytes]*Introduction

type ReplyHeader

type ReplyHeader struct {
	RoutingHeaderBytes
	// 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
}

type RoutingHeaderBytes

type RoutingHeaderBytes [consts.RoutingHeaderLen]byte

func GetRoutingHeaderFromCursor

func GetRoutingHeaderFromCursor(s *splice.Splice) (r RoutingHeaderBytes)

type Services

type Services map[crypto.PubBytes]*LocalHiddenService

Jump to

Keyboard shortcuts

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