proxy

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: BSD-3-Clause-Clear Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthHeader             = "X-Uoq-Authentication"
	AuthMethod             = "POST / HTTP/1.1"
	AuthStatusUnauthorized = "401 Unauthorized"
	AuthStatusOK           = "200 OK"
	AuthOK                 = "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"

	MaxAuthRetries    = 10
	AuthRetryInterval = 500 * time.Millisecond
)
View Source
const (
	DefaultBufferSize            = 1400
	AlpnH3                       = "h3"
	DefaultQUICKeepAliveInterval = 10 * time.Second

	TestLocalAddr = "127.0.0.1:0"
	TestSecret    = "test-secret"
)

Variables

This section is empty.

Functions

func GenerateCertAndKeyPEM

func GenerateCertAndKeyPEM() ([]byte, []byte, error)

func GenerateTLSConfig

func GenerateTLSConfig() (*tls.Config, error)

func NewClientCmd

func NewClientCmd() *cobra.Command

func NewServerCmd

func NewServerCmd() *cobra.Command

func RunClient

func RunClient(
	ctx context.Context,
	localAddr string,
	remoteAddr string,
	insecure bool,
	secret string,
	noAutoRoute bool,
	ready chan<- string,
) error

func RunServer

func RunServer(
	ctx context.Context,
	listenAddr string,
	remoteUDPAddr string,
	certFile, keyFile string,
	insecure bool,
	verbose bool,
	secret string,
	ready chan<- string,
) error

Types

type Authenticator

type Authenticator struct {
	Secret string
}

func (*Authenticator) AuthenticateClient

func (a *Authenticator) AuthenticateClient(ctx context.Context, qc *quic.Conn) error

func (*Authenticator) AuthenticateServer

func (a *Authenticator) AuthenticateServer(ctx context.Context, qc *quic.Conn) error

Jump to

Keyboard shortcuts

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