proxyserver

package
v1.71.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package proxyserver provides an implementation of a proxy server for testing purposes. The server supports only a single incoming connection at a time and is not concurrent. It handles only HTTP CONNECT requests; other HTTP methods are not supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyServer

type ProxyServer struct {
	Addr string // Address of the proxy
	// contains filtered or unexported fields
}

ProxyServer represents a test proxy server.

func New

func New(t *testing.T, reqCheck func(*http.Request), waitForServerHello bool) *ProxyServer

New initializes and starts a proxy server, registers a cleanup to stop it, and returns a ProxyServer.

Jump to

Keyboard shortcuts

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