gateway

package
v0.0.0-...-d687121 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeadlineReadWriteCloser

type DeadlineReadWriteCloser interface {
	io.ReadWriteCloser
	SetReadDeadline(time.Time) error
}

type Gateway

type Gateway struct {
	GatewayConfig
	// contains filtered or unexported fields
}

func New

func New(conf GatewayConfig) *Gateway

func (*Gateway) AttachRouter

func (g *Gateway) AttachRouter(ctx context.Context, router *transport.StreamRouter)

func (*Gateway) Close

func (g *Gateway) Close()

func (*Gateway) HandshakeEarlyHint

func (g *Gateway) HandshakeEarlyHint(sni string)

inspiration from https://blog.cloudflare.com/eliminating-cold-starts-with-cloudflare-workers/ warm the route cache when tls handshake begins

func (*Gateway) MustStart

func (g *Gateway) MustStart(ctx context.Context)

type GatewayConfig

type GatewayConfig struct {
	Handlers          InternalHandlers
	PKIServer         protocol.PKIService
	TunnelServer      tun.Server
	HTTPListener      net.Listener
	H2Listener        net.Listener
	H3Listener        q.EarlyListener
	Logger            *zap.Logger
	HandshakeHintFunc cipher.OnHandshakeFunc
	AdminUser         string
	AdminPass         string
	RootDomains       []string
	GatewayPort       int
	Options           Options
}

type InternalHandlers

type InternalHandlers struct {
	Acme         http.Handler
	Chord        http.Handler
	TunnelServer http.Handler
	Migrator     http.Handler
}

type Options

type Options struct {
	TransportBufferSize int
	ProxyBufferSize     int
}

Jump to

Keyboard shortcuts

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