tlslistener

package
v0.29.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTLSVersion added in v0.27.2

func ParseTLSVersion(s string) (uint16, error)

Types

type Config added in v0.20.2

type Config struct {
	TLSAddresses  []string
	TCPAddresses  []string
	MinTLSVersion string
}

func (Config) Apply added in v0.20.2

func (c Config) Apply(ctx context.Context, l *ListenersHandler) error

type ContextConnextion

type ContextConnextion struct {
	net.Conn
	context.Context
	CloseFunc func() error
	// contains filtered or unexported fields
}

func (ContextConnextion) Close

func (c ContextConnextion) Close() error

func (ContextConnextion) GetContext

func (c ContextConnextion) GetContext() context.Context

type ListenersHandler

type ListenersHandler struct {
	GetCertificate        func(*tls.ClientHelloInfo) (*tls.Certificate, error)
	MinTLSVersion         uint16
	ListenersForHandleTLS []net.Listener // listener which will handle TLS

	// listeners which will not handle TLS, but will proxy to self listener. It is comfortable for listen https and http
	// ports and translate it to one proxy
	Listeners []net.Listener

	NextProtos []string
	// contains filtered or unexported fields
}

func (*ListenersHandler) Accept

func (p *ListenersHandler) Accept() (net.Conn, error)

Implement net.Listener

func (*ListenersHandler) Addr

func (p *ListenersHandler) Addr() net.Addr

func (*ListenersHandler) Close

func (p *ListenersHandler) Close() error

func (*ListenersHandler) GetConnectionContext

func (p *ListenersHandler) GetConnectionContext(remoteAddr, localAddr string) (context.Context, error)

func (*ListenersHandler) Start

Jump to

Keyboard shortcuts

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