turn

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const Realm = "screego"

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

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

type ExternalServer

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

func (*ExternalServer) Credentials

func (a *ExternalServer) Credentials(id string, addr net.IP) (string, string)

func (*ExternalServer) Disallow

func (a *ExternalServer) Disallow(username string)

type Generator

type Generator struct {
	turn.RelayAddressGenerator
	IPProvider ipdns.Provider
}

func (*Generator) AllocatePacketConn

func (r *Generator) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error)

type InternalServer

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

func (*InternalServer) Credentials

func (a *InternalServer) Credentials(id string, addr net.IP) (string, string)

func (*InternalServer) Disallow

func (a *InternalServer) Disallow(username string)

type RelayAddressGeneratorNone

type RelayAddressGeneratorNone struct{}

func (*RelayAddressGeneratorNone) AllocateConn

func (r *RelayAddressGeneratorNone) AllocateConn(network string, requestedPort int) (net.Conn, net.Addr, error)

func (*RelayAddressGeneratorNone) AllocatePacketConn

func (r *RelayAddressGeneratorNone) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error)

func (*RelayAddressGeneratorNone) Validate

func (r *RelayAddressGeneratorNone) Validate() error

type RelayAddressGeneratorPortRange

type RelayAddressGeneratorPortRange struct {
	MinPort uint16
	MaxPort uint16
	Rand    randutil.MathRandomGenerator
}

func (*RelayAddressGeneratorPortRange) AllocateConn

func (r *RelayAddressGeneratorPortRange) AllocateConn(network string, requestedPort int) (net.Conn, net.Addr, error)

func (*RelayAddressGeneratorPortRange) AllocatePacketConn

func (r *RelayAddressGeneratorPortRange) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error)

func (*RelayAddressGeneratorPortRange) Validate

func (r *RelayAddressGeneratorPortRange) Validate() error

type Server

type Server interface {
	Credentials(id string, addr net.IP) (string, string)
	Disallow(username string)
}

func Start

func Start(conf config.Config) (Server, error)

Jump to

Keyboard shortcuts

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