mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 00:36:38 +00:00
add cert manager with self signed cert support
This commit is contained in:
28
proxy/internal/reverseproxy/certmanager/interface.go
Normal file
28
proxy/internal/reverseproxy/certmanager/interface.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package certmanager
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Manager defines the interface for certificate management
|
||||
type Manager interface {
|
||||
// IsEnabled returns whether certificate management is enabled
|
||||
IsEnabled() bool
|
||||
|
||||
// AddDomain adds a domain to the allowed hosts list
|
||||
AddDomain(domain string)
|
||||
|
||||
// RemoveDomain removes a domain from the allowed hosts list
|
||||
RemoveDomain(domain string)
|
||||
|
||||
// IssueCertificate eagerly issues a certificate for a domain
|
||||
IssueCertificate(ctx context.Context, domain string) error
|
||||
|
||||
// TLSConfig returns the TLS configuration for the HTTPS server
|
||||
TLSConfig() *tls.Config
|
||||
|
||||
// HTTPHandler returns the HTTP handler for ACME challenges (or fallback)
|
||||
HTTPHandler(fallback http.Handler) http.Handler
|
||||
}
|
||||
Reference in New Issue
Block a user