derpquic

package module
v0.0.0-...-450ef13 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Functions

func Listen

func Listen(derpURL string, key derpnet.Key) (net.Listener, error)

Listen connects to a DERP server URL with the provided private key. It returns net.Listener and implements a TCP-like stream. derpURL should be a valid server name compatible with the Tailscale's DERP protocol. key should have a length of 32 bytes

Types

type Connection

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

Connection implements net.Conn.

func (*Connection) Close

func (s *Connection) Close() error

Close implements net.Conn.

func (*Connection) CloseRead

func (*Connection) CloseRead() error

func (*Connection) CloseWrite

func (s *Connection) CloseWrite() error

func (*Connection) LocalAddr

func (s *Connection) LocalAddr() net.Addr

LocalAddr implements net.Conn.

func (*Connection) Read

func (s *Connection) Read(b []byte) (n int, err error)

Read implements net.Conn.

func (*Connection) RemoteAddr

func (s *Connection) RemoteAddr() net.Addr

RemoteAddr implements net.Conn.

func (*Connection) SetDeadline

func (s *Connection) SetDeadline(t time.Time) error

SetDeadline implements net.Conn.

func (*Connection) SetReadDeadline

func (s *Connection) SetReadDeadline(t time.Time) error

SetReadDeadline implements net.Conn.

func (*Connection) SetWriteDeadline

func (s *Connection) SetWriteDeadline(t time.Time) error

SetWriteDeadline implements net.Conn.

func (*Connection) Write

func (s *Connection) Write(b []byte) (n int, err error)

Write implements net.Conn.

type Dialer

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

func NewDialer

func NewDialer(derpURL string, key derpnet.Key) (*Dialer, error)

NewDialer connects to a DERP server URL with the provided private key. It returns Dialer which can be used to connect a TCP-like stream to derpquic.Listener. derpURL should be a valid server name compatible with the Tailscale's DERP protocol. key should have a length of 32 bytes

func (*Dialer) Dial

func (d *Dialer) Dial(addr derpnet.PublicKey) (net.Conn, error)

type Listener

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

Listener implements net.Listener.

func (*Listener) Accept

func (l *Listener) Accept() (net.Conn, error)

Accept implements net.Listener.

func (*Listener) Addr

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

Addr implements net.Listener.

func (*Listener) Close

func (l *Listener) Close() error

Close implements net.Listener.

Jump to

Keyboard shortcuts

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