MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / HTTPServerConfiguration

Struct HTTPServerConfiguration

config/http.go:420–439  ·  view source on GitHub ↗

HTTPServerConfiguration is a structure to configure the simple HTTP server by. goland:noinspection GoVetStructTag

Source from the content-addressed store, hash-verified

418//
419//goland:noinspection GoVetStructTag
420type HTTPServerConfiguration struct {
421 // Listen contains the IP and port to listen on.
422 Listen string `json:"listen" yaml:"listen" default:"0.0.0.0:8080"`
423 // Key contains either a file name to a private key, or the private key itself in PEM format to use as a server key.
424 Key string `json:"key" yaml:"key"`
425 // Cert contains either a file to a certificate, or the certificate itself in PEM format to use as a server
426 // certificate.
427 Cert string `json:"cert" yaml:"cert"`
428 // ClientCACert contains either a file or a certificate in PEM format to verify the connecting clients by.
429 ClientCACert string `json:"clientcacert" yaml:"clientcacert"`
430
431 // TLSVersion is the minimum TLS version to use.
432 TLSVersion TLSVersion `json:"tlsVersion" yaml:"tlsVersion" default:"1.3"`
433
434 // ECDHCurves is the list of curve algorithms to support.
435 ECDHCurves ECDHCurveList `json:"curves" yaml:"curves" default:"[\"x25519\",\"secp256r1\",\"secp384r1\",\"secp521r1\"]"`
436
437 // CipherSuites is a list of supported cipher suites.
438 CipherSuites CipherSuiteList `json:"cipher" yaml:"cipher" default:"[\"TLS_AES_128_GCM_SHA256\",\"TLS_AES_256_GCM_SHA384\",\"TLS_CHACHA20_POLY1305_SHA256\",\"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\",\"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\"]"`
439}
440
441func (config *HTTPServerConfiguration) Validate() error {
442 _, err := config.ValidateWithCerts()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected