protocol

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mapper = make(map[string]Creator)

Functions

func NewDialer added in v1.1.3

func NewDialer(name string, nextDialer proxy.Dialer, metadata Metadata, password string) (proxy.Dialer, error)

func Register added in v1.1.3

func Register(name string, c Creator)

func TCPAddrToUDPAddr added in v1.1.3

func TCPAddrToUDPAddr(addr *net.TCPAddr) *net.UDPAddr

Types

type Creator added in v1.1.3

type Creator func(nextDialer proxy.Dialer, metadata Metadata, password string) (proxy.Dialer, error)

type Metadata added in v1.1.3

type Metadata struct {
	Type     MetadataType
	Hostname string
	Port     uint16
	// Cmd is valid only if Type is MetadataTypeMsg.
	Cmd      MetadataCmd
	Network  string
	Cipher   string
	IsClient bool
}

type MetadataCmd

type MetadataCmd uint8
const (
	MetadataCmdPing MetadataCmd = iota
	MetadataCmdSyncPassages
	MetadataCmdResponse
)

type MetadataType added in v1.1.3

type MetadataType int
const (
	MetadataTypeIPv4 MetadataType = iota
	MetadataTypeIPv6
	MetadataTypeDomain
	MetadataTypeMsg
	MetadataTypeInvalid
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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