connectproxy

package
v0.0.0-...-56f983d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package connectproxy implements a HTTP CONNECT proxy that supports man-in-the-middle interception of connections to a HTTPS server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	FakeCA *fakeca.FakeCA

	LocalMap  map[string]string
	RemoteMap map[string]string
	PrefixMap map[string][]string

	ProxyMap map[string]*domainInfo
	// contains filtered or unexported fields
}

Proxy is a HTTP CONNECT proxy server.

func New

func New(fakeCA *fakeca.FakeCA, hostPairs []string, prefixPairs []string, done chan<- bool) *Proxy

New returns a HTTP CONNECT proxy server.

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP handles HTTP CONNECT requests. It can also redirect a localhost URL to a HTTPS URL.

Jump to

Keyboard shortcuts

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