http

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EdgeHTTPProxy

func EdgeHTTPProxy(forwardingAddress func(string) string, caList *x509.CertPool, clientCert *tls.Certificate, proxyForEdge func(*http.Request) (*url.URL, error)) http.Handler

EdgeHTTPProxy starts serving the proxy requests via proxyForEdge (http.request).

func EdgeTransport

func EdgeTransport(caList *x509.CertPool, clientCert *tls.Certificate, proxyForEdge func(*http.Request) (*url.URL, error)) *http.Transport

EdgeTransport - transport layer for the edge-proxy

Types

type SmartProxy

type SmartProxy struct {
	// contains filtered or unexported fields
}

SmartProxy - stores http and websocket handlers

func SmartHTTPProxy

func SmartHTTPProxy(forwardingAddress func(string) string, caList *x509.CertPool, clientCert *tls.Certificate, proxyForEdge func(*http.Request) (*url.URL, error)) *SmartProxy

SmartHTTPProxy function for proxying the connections (http and websocket)

func (*SmartProxy) ServeHTTP

func (smartProxy *SmartProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WebsocketProxyHandler

type WebsocketProxyHandler struct {
	Dialer   *websocket.Dialer
	ProxyURL *url.URL
	Upgrader websocket.Upgrader
	// contains filtered or unexported fields
}

WebsocketProxyHandler - keeps track of websocket prooxy details

func (*WebsocketProxyHandler) ServeHTTP

func (websocketProxyHandler *WebsocketProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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