proxy

package
v0.0.0-...-37f2402 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Proxy

func Proxy(log *logrus.Entry, w http.ResponseWriter, r *http.Request, sz int)

Proxy takes an HTTP/1.x CONNECT Request and ResponseWriter from the Golang HTTP stack and uses Hijack() to get the underlying Connection (c1). It dials a second Connection (c2) to the requested end Host and then copies data in both directions (c1->c2 and c2->c1).

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

func NewDialer

func NewDialer(isLocalDevelopmentMode bool) (Dialer, error)

NewDialer returns a Dialer which can dial a customer cluster API server. When not in local development mode, there is no magic here. In local development mode, this dials the development proxy, which proxies to the requested endpoint. This enables the RP to run without routeability to its vnet in local development mode.

type Server

type Server struct {
	Log *logrus.Entry

	CertFile       string
	KeyFile        string
	ClientCertFile string
	Subnet         string
	// contains filtered or unexported fields
}

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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