tls

package
v0.0.0-...-a5406a4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoClue = errors.New("not enough information for making a decision")
)
View Source
var ErrNotTLS = errors.New("not TLS header")

Functions

func IsValidTLSVersion

func IsValidTLSVersion(major, minor byte) bool

func NewConnHandler

func NewConnHandler(s *config.ConfigProxyService,
	c net.Conn,
	out outbound.Outbound,
) (net.Conn, error)

func ReadClientHello

func ReadClientHello(data []byte, h *SniffHeader) error

ReadClientHello returns server name (if any) from TLS client hello message. https://github.com/golang/go/blob/master/src/crypto/tls/handshake_messages.go#L300

Types

type SniffHeader

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

func SniffAndRecordTLS

func SniffAndRecordTLS(conn net.Conn) (*SniffHeader, *bytes.Buffer, error)

func SniffTLS

func SniffTLS(b []byte) (*SniffHeader, error)

func (*SniffHeader) Domain

func (h *SniffHeader) Domain() string

func (*SniffHeader) Protocol

func (h *SniffHeader) Protocol() string

Jump to

Keyboard shortcuts

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