dtls

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DTLSMode_name = map[int32]string{
		0: "INVALID",
		1: "PSK",
	}
	DTLSMode_value = map[string]int32{
		"INVALID": 0,
		"PSK":     1,
	}
)

Enum value maps for DTLSMode.

View Source
var File_transport_internet_dtls_config_proto protoreflect.FileDescriptor

Functions

func ListenDTLS

func ListenDTLS(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, addConn internet.ConnHandler) (internet.Listener, error)

Types

type Config

type Config struct {
	Mode                   DTLSMode `protobuf:"varint,1,opt,name=mode,proto3,enum=v2ray.core.transport.internet.dtls.DTLSMode" json:"mode,omitempty"`
	Psk                    []byte   `protobuf:"bytes,2,opt,name=psk,proto3" json:"psk,omitempty"`
	Mtu                    uint32   `protobuf:"varint,3,opt,name=mtu,proto3" json:"mtu,omitempty"`
	ReplayProtectionWindow uint32   `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetMode

func (x *Config) GetMode() DTLSMode

func (*Config) GetMtu

func (x *Config) GetMtu() uint32

func (*Config) GetPsk

func (x *Config) GetPsk() []byte

func (*Config) GetReplayProtectionWindow

func (x *Config) GetReplayProtectionWindow() uint32

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type ConnectionID

type ConnectionID struct {
	Remote net.Address
	Port   net.Port
}

type DTLSMode

type DTLSMode int32
const (
	DTLSMode_INVALID DTLSMode = 0
	DTLSMode_PSK     DTLSMode = 1
)

func (DTLSMode) Descriptor

func (DTLSMode) Descriptor() protoreflect.EnumDescriptor

func (DTLSMode) Enum

func (x DTLSMode) Enum() *DTLSMode

func (DTLSMode) EnumDescriptor deprecated

func (DTLSMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use DTLSMode.Descriptor instead.

func (DTLSMode) Number

func (x DTLSMode) Number() protoreflect.EnumNumber

func (DTLSMode) String

func (x DTLSMode) String() string

func (DTLSMode) Type

type Listener

type Listener struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewListener

func NewListener(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, addConn internet.ConnHandler) (*Listener, error)

func (*Listener) Addr

func (l *Listener) Addr() net.Addr

func (*Listener) Close

func (l *Listener) Close() error

func (*Listener) OnReceive

func (l *Listener) OnReceive(payload *buf.Buffer, src net.Destination)

func (*Listener) Remove

func (l *Listener) Remove(src net.Destination)

Jump to

Keyboard shortcuts

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