Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSANs ¶ added in v0.72.0
ParseSANs validates the tls.extra_sans entries and splits them into DNS names and IP addresses. An entry is an IP literal ("192.168.1.10", "fd7a::1") or a host name made of letters, digits, '-' and '_' separated by dots; it is not a URL, has no port and no wildcard. DNS names are lower-cased, and an entry that repeats another one, or one of the names every certificate already carries (localhost, 127.0.0.1, ::1), is dropped. The error names the zero-based index and the offending value.
Types ¶
type Options ¶
type Options struct {
Dir string // e.g., ~/.mcpproxy/certs
RequireClientCert bool
// ExtraSANs are DNS names and IP literals added to the generated server
// certificate (tls.extra_sans). Ignored when CertFile is set.
ExtraSANs []string
// CertFile and KeyFile (tls.cert_file, tls.key_file) name an operator-
// provided certificate and key, served instead of a generated one. Both or
// neither.
CertFile string
KeyFile string
}
Click to show internal directories.
Click to hide internal directories.