Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProxySingleConnection ¶
func ProxySingleConnection( conn net.Conn, httpVersion string, startProxyCallback L7StartProxyCallback, endProxyCallback L7EndProxyCallback, ) error
ProxySingleConnection constructs an HTTP reverse proxy capable of proxying both HTTP 1.x and h2c (HTTP/2 without TLS) requests and uses it to serve the provided connection.
func Version ¶
func Version(conn net.PeekableConn) string
Version peeks at a PeekableConn and attempts to determine whether it is being used for HTTP requests. If so, and it can recognize the HTTP version, the version is returned. In all other cases, an empty string is returned.
Types ¶
type L7EndProxyCallback ¶
L7EndProxyCallback is the function signature for functions used as callbacks after an L7 proxy completes.
Click to show internal directories.
Click to hide internal directories.