dns

package
v0.0.0-...-f373710 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dotify

func Dotify(data []byte) (string, error)

Dotify - dotifies a string

func NewFromMap

func NewFromMap(node api.Node, t map[string]interface{}) api.Transport

NewFromMap : Makes a new instance of this transport module from a map of arguments (for deserialization support)

func Undotify

func Undotify(data string) ([]byte, error)

Undotify - un-dotifies a string

Types

type Module

type Module struct {
	ListenStr, UpstreamStr string
	ClientConv, ServerConv uint32
	// contains filtered or unexported fields
}

Module : DNS Implementation of a Transport module

func New

func New(node api.Node, clientConv uint32, serverConv uint32) *Module

New : Makes a new instance of this transport module

func (*Module) ByteLimit

func (m *Module) ByteLimit() int64

ByteLimit - get limit on bytes per bundle for this transport

func (*Module) IsRunningClient

func (m *Module) IsRunningClient() bool

IsRunningClient - returns true if the client is running

func (*Module) IsRunningServer

func (m *Module) IsRunningServer() bool

IsRunningServer - returns true if the server is running

func (*Module) Listen

func (m *Module) Listen(listen string, adminMode bool)

Listen : opens a UDP socket and listens

func (*Module) MarshalJSON

func (m *Module) MarshalJSON() (b []byte, e error)

MarshalJSON : Create a serialied representation of the config of this module

func (*Module) Name

func (m *Module) Name() string

Name : Returns name of module

func (*Module) RPC

func (m *Module) RPC(host string, method api.Action, args ...interface{}) (interface{}, error)

RPC : transmit data via DNS

func (*Module) SetByteLimit

func (m *Module) SetByteLimit(limit int64)

SetByteLimit - set limit on bytes per bundle for this transport

func (*Module) Stop

func (m *Module) Stop()

Stop : Stops module

func (*Module) WriteDownstream

func (m *Module) WriteDownstream(buf []byte, size int)

WriteDownstream - Writes KCP data to the DNS Client via DNS Responses

func (*Module) WriteUpstream

func (m *Module) WriteUpstream(buf []byte, size int)

WriteUpstream - Writes KCP data in DNS Request form to the channel headed outbound from the client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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