proxy

package module
v0.0.0-...-41fa4f3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRootCertificate

func CreateRootCertificate(certPEM, privPEM io.Writer) error

func CreateSubCertificate

func CreateSubCertificate(parentCertPEM, parentPrivPEM []byte, certPEM, privPEM io.Writer, servername string) error

func GenerateRandomKey

func GenerateRandomKey(length int) []byte

Types

type OnRequestFunc

type OnRequestFunc func(req *http.Request) (*http.Request, *http.Response)

type OnResponseFunc

type OnResponseFunc func(resp *http.Response) *http.Response

type Server

type Server struct {
	Addr   string
	Logger logrus.Logger
	// contains filtered or unexported fields
}

func NewServer

func NewServer() Server

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe() error

func (*Server) ListenAndServeTLS

func (srv *Server) ListenAndServeTLS(certPEM, privPEM []byte) error

func (*Server) OnRequest

func (srv *Server) OnRequest(fn OnRequestFunc)

func (*Server) OnResponse

func (srv *Server) OnResponse(fn OnResponseFunc)

func (*Server) Serve

func (srv *Server) Serve(l net.Listener) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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