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 ¶
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 ¶
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) 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 PlainServer ¶
type PlainServer struct {
// contains filtered or unexported fields
}
PlainServer is a running plain-HTTP listener (for http:// AWS endpoint URLs).
func (*PlainServer) Addr ¶
func (s *PlainServer) Addr() net.Addr
Addr returns the bound listen address.
func (*PlainServer) Close ¶
func (s *PlainServer) Close() error
Close gracefully shuts the listener down and waits for it to exit.
type S3Host ¶
type S3Host struct {
// Name is the access point name or website bucket.
Name string
// Account is the 12-digit account of an access-point or control host.
Account string
Kind S3HostKind
}
S3Host is a parsed S3 endpoint hostname.
func ParseS3Host ¶
ParseS3Host recognises access-point, website and S3 Control hostnames (dual-stack and FIPS included).
type S3HostKind ¶
type S3HostKind int
S3HostKind classifies a real S3 endpoint hostname that is not plain path/virtual-hosted data access.
const ( // S3HostAccessPoint is <name>-<account>.s3-accesspoint[-fips].<region>.<zone>. S3HostAccessPoint S3HostKind = iota + 1 // S3HostWebsite is <bucket>.s3-website[-<region>|.<region>].<zone>. S3HostWebsite // S3HostControl is <account>.s3-control[-fips][.dualstack].<region>.<zone>. S3HostControl )