quicproxy

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeProxy

func ServeProxy(ctx context.Context, frontend ProxyFrontend, conn quic.Connection, callback func(Allocation) error) error

Types

type Allocation

type Allocation struct {
	Endpoint string
}

type Handlers

type Handlers struct {
	OnAllocation func(Allocation) error
	OnCleanup    func(Allocation, error)
	HandleConn   func(net.Conn)
}

type ProxyFrontend

type ProxyFrontend interface {
	ListenAndServe(context.Context) error
	Handle(context.Context, Handlers) error
}

type ProxyProtoFrontend

type ProxyProtoFrontend struct {
	ListenPort         int
	PortStart, PortEnd int
	PublicAddr         string
	// contains filtered or unexported fields
}

func (*ProxyProtoFrontend) Handle

func (pf *ProxyProtoFrontend) Handle(ctx context.Context, handlers Handlers) error

func (*ProxyProtoFrontend) ListenAndServe

func (pf *ProxyProtoFrontend) ListenAndServe(ctx context.Context) error

type RawFrontend

type RawFrontend struct {
	PublicAddr string
}

func (RawFrontend) Handle

func (rf RawFrontend) Handle(ctx context.Context, handlers Handlers) error

func (RawFrontend) ListenAndServe

func (rf RawFrontend) ListenAndServe(ctx context.Context) error

type Server

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

func NewServer

func NewServer(ctx context.Context, opts ServerOpts) (*Server, error)

func (*Server) Close

func (srv *Server) Close() error

func (*Server) Serve

func (srv *Server) Serve(ctx context.Context) error

type ServerOpts

type ServerOpts struct {
	ProxyFrontend    ProxyFrontend
	ListenAddr       string
	Subjects         tlscerts.Subjects
	EnableGitHubOIDC bool
}

Jump to

Keyboard shortcuts

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