connproxy

package
v0.0.0-...-4c4ec36 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnInfo

type ConnInfo struct {
	Hostname string
	Addr     string
}

func (ConnInfo) LogValue

func (info ConnInfo) LogValue() slog.Value

type HeaderParser

type HeaderParser interface {
	ParseHeader(logf slogf.Logf, reader io.Reader) (hostname string, receivedData []byte, err error)
}

type Proxy

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

func New

func New(headerParser HeaderParser, port int) *Proxy

func (*Proxy) HandleConn

func (p *Proxy) HandleConn(ctx context.Context, logf slogf.Logf, localConn net.Conn) (info ConnInfo, _ error)

HandleConn parses tls message, and tunnels conn based on SNI

HandleConn doesn't close the connection

Jump to

Keyboard shortcuts

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