Documentation
¶
Overview ¶
Package proxy is the Infisical/OneCLI inject path: HTTP(S)_PROXY with goproxy MITM. CONNECT is goproxy. Credentials attach at the edge. Unknown hosts fail closed. The agent never receives a secret.
CA wiring follows the official customca example: https://github.com/elazarl/goproxy/blob/master/examples/customca/main.go
Index ¶
Constants ¶
const DummySecret = "veil-inject"
DummySecret is the Infisical-style placeholder in a child env. Origin run never copies vault material onto the laptop. HTTPS_PROXY substitutes.
Variables ¶
This section is empty.
Functions ¶
func CACertPath ¶
func GenerateCA ¶
GenerateCA makes a local-only ECDSA P-256 CA. Used for goproxy MITM. Source: crypto/x509; MITM CONNECT handling stays in elazarl/goproxy.
func LoadOrCreateCA ¶
func LoadOrCreateCA(dir string) (tls.Certificate, []byte, error)
Types ¶
type OriginResult ¶
type OriginResult struct {
Decision protocol.Decision
Reason string
Status int
Header http.Header
Body []byte
}
OriginResult is POST /v1/use unwrapped for MITM. Not a GetSecret.
type OriginUse ¶
type OriginUse func(ctx context.Context, item, method, rawURL string, header http.Header, body []byte) (OriginResult, error)
OriginUse fetches via origin. The laptop never receives the vault secret.
type Server ¶
type Server struct {
App *app.App
Agent protocol.Principal
Token string
Dir string
CA tls.Certificate
CAPEM []byte
ListenAddr string
OutboundTLS *tls.Config
Now func() time.Time
OriginItems []protocol.Item
OriginUse OriginUse
// contains filtered or unexported fields
}