proxy

package
v0.0.0-...-649705d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 21 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

View Source
var (
	LogFieldFlowID = "flowID"
)

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,
	originDialer ingress.OriginDialer,
	tags []pogs.Tag,
	flowLimiter cfdflow.Limiter,
	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,
	conn 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