Documentation
¶
Overview ¶
Package proxyhttp provides shared HTTP proxy transport primitives.
The package intentionally stays narrow: transport construction, protocol detection helpers, and hop-by-hop header handling that can be reused by forward, reverse, and MITM proxy implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyForwardedHeaders ¶
func ApplyForwardedHeaders(h http.Header, cfg ForwardedHeaderConfig)
ApplyForwardedHeaders sets standard proxy forwarding headers when values are available in cfg.
func IsAbsoluteURL ¶
IsAbsoluteURL reports whether s looks like an absolute URI.
func IsWebSocketRequest ¶
IsWebSocketRequest reports whether the request looks like a WebSocket upgrade.
func NewTransport ¶
func NewTransport(cfg TransportConfig) *http.Transport
NewTransport centralizes proxy-oriented http.Transport creation.
func RemoveHopHeaders ¶
RemoveHopHeaders strips hop-by-hop headers before proxying.
Types ¶
type ForwardedHeaderConfig ¶
type TransportConfig ¶
type TransportConfig struct {
InsecureTLS bool
}
Click to show internal directories.
Click to hide internal directories.