egress

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package egress is a per-VM CONNECT proxy: default-deny, per-session allowlist, audit log. It is the only path out for session containers on the internal network (spec §8). The session is identified by its Proxy-Authorization header, either a literal Bearer token (the session id) or — the form a plain HTTP_PROXY/HTTPS_PROXY env var actually produces, since curl/wget have no way to set a literal header from an env var — HTTP Basic auth decoded from the proxy URL's userinfo (http://<session-id>:<ignored>@host:port), added for egress R4's env-var proxy flow (Task 13; see sessionFromProxyAuth). A CONNECT that carries no usable identity is answered with a 407 challenge rather than a refusal, because a client that waits to be asked (git does; curl does not) would otherwise never send the credential it already holds — see challengeRealm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

func New

func New(audit io.Writer) *Proxy

func (*Proxy) Handler

func (p *Proxy) Handler() http.Handler

func (*Proxy) SetAllow

func (p *Proxy) SetAllow(session string, hosts []string)

type Rule

type Rule struct {
	Session string
	Allow   []string
}

Jump to

Keyboard shortcuts

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