proxyserver

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

Package `proxyserver` listens and accepts TLS connections. It captures data that is required for fingerprinting; for example, the ClientHello record and certain HTTP2 frames.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// required, TLS config that including certificates, etc
	TLSConfig *tls.Config

	// required, set to your http.Server if you want to customize
	HTTPServer *http.Server

	// required, set to your http2.Server if you want to customize
	HTTP2Server *http2.Server

	// optional, error logger
	ErrorLog *log.Logger

	// optional, whether enable verbose and debug logs
	VerboseLogs bool

	// optional, prometheus metrics registry
	MetricsRegistry *prometheus.Registry

	// optional, prometheus metrics namespace, aka, prefix
	MetricsPrefix string

	// optional, TLS handshake timeout, default is infinity
	TLSHandshakeTimeout time.Duration
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, handler http.Handler, tlsConfig *tls.Config) *Server

Creates a new proxy server

func (*Server) ListenAndServe

func (server *Server) ListenAndServe(listenAddr string) error

func (*Server) Serve

func (server *Server) Serve(ln net.Listener) error

Jump to

Keyboard shortcuts

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