Help us shape the future of Go! Take the 2026 Go Developer Survey

egressforward

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package egressforward is the seat's local egress proxy. Harness processes use it through HTTPS_PROXY/HTTP_PROXY; it passes each CONNECT tunnel or plain HTTP request to the egress gateway with the seat's current token (read from the token file for every connection), the lease generation and the current execution. The gateway decides what is allowed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

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

Forwarder is the local proxy.

func Start

func Start(o Options) (*Forwarder, error)

Start listens on a loopback port.

func (*Forwarder) Close

func (f *Forwarder) Close()

Close stops accepting connections.

func (*Forwarder) Env

func (f *Forwarder) Env(direct ...string) []string

Env is the proxy environment for harness processes. Loopback and the platform host are reached directly.

func (*Forwarder) URL

func (f *Forwarder) URL() string

URL is the proxy URL for HTTPS_PROXY and HTTP_PROXY.

type Options

type Options struct {
	// GatewayURL is the egress gateway, e.g. http://steadmesh-egress.steadmesh-system.svc:3128.
	GatewayURL string
	TokenFile  string
	Generation func() int64
	Execution  func() string
	Log        *slog.Logger
}

Options configure a forwarder.

Jump to

Keyboard shortcuts

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