proxy

package
v0.0.0-...-f274180 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TagHeaderNamePrefix indicates a Cloudflared Warp Tag prefix that gets appended for warp traffic stream headers.
	TagHeaderNamePrefix = "Cf-Warp-Tag-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy represents a means to Proxy between cloudflared and the origin services.

func NewOriginProxy

func NewOriginProxy(
	ingressRules ingress.Ingress,
	warpRouting ingress.WarpRoutingConfig,
	tags []tunnelpogs.Tag,
	writeTimeout time.Duration,
	log *zerolog.Logger,
) *Proxy

NewOriginProxy returns a new instance of the Proxy struct.

func (*Proxy) ProxyHTTP

func (p *Proxy) ProxyHTTP(
	w connection.ResponseWriter,
	tr *tracing.TracedHTTPRequest,
	isWebsocket bool,
) error

ProxyHTTP further depends on ingress rules to establish a connection with the origin service. This may be a simple roundtrip or a tcp/websocket dial depending on ingres rule setup.

func (*Proxy) ProxyTCP

func (p *Proxy) ProxyTCP(
	ctx context.Context,
	rwa connection.ReadWriteAcker,
	req *connection.TCPRequest,
) error

ProxyTCP proxies to a TCP connection between the origin service and cloudflared.

Jump to

Keyboard shortcuts

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