tshttpproxy

package
v1.38.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: BSD-3-Clause Imports: 14 Imported by: 32

Documentation

Overview

Package tshttpproxy contains Tailscale additions to httpproxy not available in golang.org/x/net/http/httpproxy. Notably, it aims to support Windows better.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthHeader

func GetAuthHeader(u *url.URL) (string, error)

GetAuthHeader returns the Authorization header value to send to proxy u.

func InvalidateCache

func InvalidateCache()

InvalidateCache invalidates the package-level cache for ProxyFromEnvironment.

It's intended to be called on network link/routing table changes.

func ProxyFromEnvironment

func ProxyFromEnvironment(req *http.Request) (*url.URL, error)

ProxyFromEnvironment is like the standard library's http.ProxyFromEnvironment but additionally does OS-specific proxy lookups if the environment variables alone don't specify a proxy.

func SetTransportGetProxyConnectHeader

func SetTransportGetProxyConnectHeader(tr *http.Transport)

SetTransportGetProxyConnectHeader sets the provided Transport's GetProxyConnectHeader field, and adds logging of the received response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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