Versions in this module Expand all Collapse all v1 v1.16.1 Dec 14, 2025 v1.16.0 Nov 15, 2025 Changes in this version + type Mode string + const ModeRemoteAPI + const ModeTLSEncrypt + const ModeTLSExternal + const ModeTLSSelfSigned + type Server struct + func New(server *http.Server, tlser ...TLSer) *Server + func (s *Server) Run() error + func (s *Server) Scheme() string + func (s *Server) Shutdown(ctx context.Context) error + type TLSAutoEncryptConfig struct + func NewTLSEAutoEncryptConfig(domain string, email string, opts ...TLSEncryptOption) *TLSAutoEncryptConfig + func (c *TLSAutoEncryptConfig) Run(server *http.Server) error + func (c *TLSAutoEncryptConfig) Validate() error + type TLSEncryptOption func(*tlsEncryptOptions) + func WithTLSEncryptCacheDir(cacheDir string) TLSEncryptOption + func WithTLSEncryptEnableRedirect(httpAddr ...string) TLSEncryptOption + type TLSExternalConfig struct + func NewTLSExternalConfig(certFile, keyFile string) *TLSExternalConfig + func (c *TLSExternalConfig) Run(server *http.Server) error + func (c *TLSExternalConfig) Validate() error + type TLSRemoteAPIConfig struct + func NewTLSRemoteAPIConfig(url string, opts ...TLSRemoteAPIOption) *TLSRemoteAPIConfig + func (c *TLSRemoteAPIConfig) Run(server *http.Server) error + func (c *TLSRemoteAPIConfig) Validate() error + type TLSRemoteAPIOption func(*tlsRemoteAPIOptions) + func WithTLSRemoteAPICacheDir(cacheDir string) TLSRemoteAPIOption + func WithTLSRemoteAPIHeaders(headers map[string]string) TLSRemoteAPIOption + func WithTLSRemoteAPITimeout(timeout time.Duration) TLSRemoteAPIOption + type TLSRemoteAPIResponse struct + CertFile []byte + KeyFile []byte + type TLSSelfSignedConfig struct + func NewTLSSelfSignedConfig(opts ...TLSSelfSignedOption) *TLSSelfSignedConfig + func (c *TLSSelfSignedConfig) Run(server *http.Server) error + func (c *TLSSelfSignedConfig) Validate() error + type TLSSelfSignedOption func(*tlsSelfSignedOptions) + func WithTLSSelfSignedCacheDir(cacheDir string) TLSSelfSignedOption + func WithTLSSelfSignedExpirationDays(expirationDays int) TLSSelfSignedOption + func WithTLSSelfSignedWanIPs(wanIPs ...string) TLSSelfSignedOption + type TLSer interface + Run func(server *http.Server) error + Validate func() error