dddns

package
v0.0.0-...-66401d2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VERSION ...
	VERSION = "0.1"
	// RendezvousRefresh time in minutes
	// With larger values node may not be reachable
	RendezvousRefresh = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DDDNS

type DDDNS struct {
	// Address to listen on
	Addr string

	Pubkey crypto.PubKey

	ProtID string
	ID     string
	Port   int
	// contains filtered or unexported fields
}

DDDNS type TODO: Use a config struct

func NewDDDNS

func NewDDDNS(port int, datadir string, bnode string, protid string) (dddns *DDDNS)

NewDDDNS creates a new DDDNS node

func (*DDDNS) Close

func (dddns *DDDNS) Close()

func (*DDDNS) Resolve

func (dddns *DDDNS) Resolve(id string) string

Resolve as client the IP of a peer

func (*DDDNS) Start

func (dddns *DDDNS) Start()

Start initializes the DDNS with all required functions

func (*DDDNS) StartDaemon

func (dddns *DDDNS) StartDaemon()

StartDaemon endless loop

type Message

type Message struct {
	Type      string `json:"type"`
	Timestamp string `json:"timestamp"`
	Data      string `json:"data"`
	Signature []byte `json:"signature"`
	Nonce     uint32 `json:"nonce"`
}

Message ... Should include a signature to validate it's the right answer

Jump to

Keyboard shortcuts

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