package tshttpproxy
import "tailscale.com/net/tshttpproxy"
Package tshttpproxy contains Tailscale additions to httpproxy not available in golang.org/x/net/http/httpproxy. Notably, it aims to support Windows better.
Index ¶
- func GetAuthHeader(u *url.URL) (string, error)
- func InvalidateCache()
- func ProxyFromEnvironment(req *http.Request) (ret *url.URL, _ error)
- func SetSelfProxy(addrs ...string)
- func SetTransportGetProxyConnectHeader(tr *http.Transport)
Functions ¶
func GetAuthHeader ¶
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 ¶
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 SetSelfProxy ¶
func SetSelfProxy(addrs ...string)
SetSelfProxy configures this package to avoid proxying through any of the provided addresses–e.g. if they refer to proxies being run by this process.
func SetTransportGetProxyConnectHeader ¶
SetTransportGetProxyConnectHeader sets the provided Transport's GetProxyConnectHeader field, and adds logging of the received response.
Source Files ¶
mksyscall.go tshttpproxy.go tshttpproxy_linux.go tshttpproxy_synology.go
- Version
- v1.84.0 (latest)
- Published
- May 21, 2025
- Platform
- linux/amd64
- Imports
- 17 packages
- Last checked
- 1 day ago –
Tools for package owners.