transparent

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package transparent serves gopherstack over HTTPS for unmodified AWS SDKs that target real *.amazonaws.com endpoints (DNS points them at gopherstack).

Index

Constants

View Source
const (
	// DefaultAddr is the HTTPS listen address real AWS endpoints expect.
	DefaultAddr = ":443"
	// CAPath serves the CA certificate clients must trust.
	CAPath = "/_gopherstack/ca.pem"
)

Variables

This section is empty.

Functions

func CAHandler

func CAHandler(ca *devtls.CA) http.Handler

CAHandler serves the CA certificate PEM.

func IsAWSHost

func IsAWSHost(host string) bool

IsAWSHost reports whether host (port optional) is a real AWS endpoint name.

Types

type CertSource

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

CertSource issues leaf certificates on demand from SNI, signed by a CA.

func NewCertSource

func NewCertSource(ca *devtls.CA) *CertSource

NewCertSource creates a CertSource backed by ca.

func (*CertSource) Close

func (c *CertSource) Close()

Close releases the cache.

func (*CertSource) GetCertificate

func (c *CertSource) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificate implements tls.Config.GetCertificate. A name's certificate also covers its siblings via a one-label wildcard on the parent zone.

type Server

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

Server is a running transparent HTTPS listener.

func Start

func Start(ctx context.Context, addr string, h http.Handler, ca *devtls.CA) (*Server, error)

Start listens on addr and serves h over TLS with on-demand AWS certificates until ctx is done.

func (*Server) Addr

func (s *Server) Addr() net.Addr

Addr returns the bound listen address.

func (*Server) Close

func (s *Server) Close() error

Close gracefully shuts the listener down and waits for it to exit.

Jump to

Keyboard shortcuts

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