client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const ServerName = constants.EnclaveDNSName

ServerName is the SAN of the server's X.509 certificate.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPClientFactory

type HTTPClientFactory func(rootCA *x509.Certificate) HTTPClient

func DefaultHTTPClientFactory

func DefaultHTTPClientFactory(clientCertificate tls.Certificate) HTTPClientFactory

DefaultHTTPClientFactory returns a secure HTTPClientFactory suitable for the most common uses.

type Server

type Server struct {
	Mux *http.ServeMux
	// contains filtered or unexported fields
}

func NewProxyServer

func NewProxyServer(backendServerAddr string, uniqueID string, httpClientFactory HTTPClientFactory, ownerCert []byte, insecure bool) (*Server, error)

NewProxyServer creates a new server that forwards requests to the backend server, handling attestation and authentication.

func (*Server) Run

func (s *Server) Run(address string) error

Run runs the server on the given address.

Jump to

Keyboard shortcuts

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