descriptor

package
v0.0.0-...-a096643 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDescriptorRaw

func GenerateDescriptorRaw(introductionPoints []IntroductionPoint, publishedTime time.Time, replica byte,
	deviation uint8, descriptorCookie string, permanentKey *rsa.PublicKey, privateKey *rsa.PrivateKey, permID []byte, descriptorID []byte) ([]byte, error)

GenerateDescriptorRaw generates a raw signed hidden service descriptor

Types

type HiddenServiceDescriptor

type HiddenServiceDescriptor struct {
	DescriptorID          string
	Version               int
	PermanentKey          string
	SecretID              string
	Published             time.Time
	ProtocolVersions      []int
	IntroductionPointsRaw string
	IntroductionPoints    []IntroductionPoint
	Signature             string
}

HiddenServiceDescriptor represents a v2 hidden service descriptor as defined in https://github.com/torproject/torspec/blob/master/rend-spec-v2.txt

func ParseHiddenServiceDescriptor

func ParseHiddenServiceDescriptor(descriptorRaw string) (*HiddenServiceDescriptor, error)

type IntroductionPoint

type IntroductionPoint struct {
	Identifier string
	Address    net.IP
	Port       int
	OnionKey   string
	ServiceKey string
	Raw        string
}

IntroductionPoint represents a introduction point

type IntroductionPointsIterator

type IntroductionPointsIterator struct {
	// contains filtered or unexported fields
}

IntroductionPointsIterator is a stateful iterator for introduction points

func NewIntroductionPointsIterator

func NewIntroductionPointsIterator(introductionPoints [][]IntroductionPoint) *IntroductionPointsIterator

NewIntroductionPointsIterator returns a new NewIntroductionPointsIterator

func (*IntroductionPointsIterator) Next

Next returns the next IntroductionPoint in the cycle

type RouterFlags

type RouterFlags struct {
	Authority bool
	BadExit   bool
	Exit      bool
	Fast      bool
	Guard     bool
	HSDir     bool
	Named     bool
	Stable    bool
	Running   bool
	Unnamed   bool
	V2Dir     bool
	Valid     bool
}

RouterFlags represents the possible flags a router status can have

type RouterStatusEntry

type RouterStatusEntry struct {
	Nickname    string
	Fingerprint string
	Digest      string
	Published   time.Time
	Address     net.IP
	ORPort      int
	DirPort     int
	Flags       RouterFlags
	Version     string
	Bandwidth   int
	Accept      bool
	PortList    string
}

RouterStatusEntry represents a router status entry as its defined in https://gitweb.torproject.org/torspec.git/plain/dir-spec.txt

func ParseRouterStatusEntriesRaw

func ParseRouterStatusEntriesRaw(data string) ([]RouterStatusEntry, error)

Jump to

Keyboard shortcuts

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