TLS¶
GOST has three types of TLS certificates: self-generated certificate, global certificate, and service-level certificate.
Self-generated Certificate¶
GOST automatically generates a TLS certificate on every run, and if no certificate is specified, this certificate is used as the default.
Customize Certificate Information¶
validity
(duration, default=8760h)- Validity period.
commonName
(string, default=gost.run)- Common Name.
organization
(string, default=GOST)- Organization.
Global Certificate¶
The global certificate uses the automatically generated certificate by default, or you can specify a custom certificate file through configuration.
!!! tip "Default Files)
GOST will automatically load the cert.pem
, key.pem
, ca.pem
files in the current working directory to initialize the global certificate.
Service-level Certificate¶
The listeners and handlers of each service can set their own certificates separately, and the global certificate is used by default.
Client Settings¶
Clients can set certificates separately for dialers and connectors for each node.
caFile
(string)- CA certificate file path. Setting up a CA certificate will enable Certificate Pinning.
secure
(bool, default=false)- Enable server certificate and domain name verification.
serverName
(string)- If
secure
is set to true, you need to specify the server domain name through this option for domain name verification. By default,IP_OR_DOMAIN
in the setting is used as the serverName.
TLS Options¶
services:
- name: service-0
addr: :8443
handler:
type: http
listener:
type: tls
tls:
options:
minVersion: VersionTLS12
maxVersion: VersionTLS13
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
alpn:
- h2
- http/1.1
minVersion
(string)- Minimum TLS Version,
VersionTLS10
,VersionTLS11
,VersionTLS12
orVersionTLS13
. maxVersion
(string)- Maximum TLS Version,
VersionTLS10
,VersionTLS11
,VersionTLS12
orVersionTLS13
. cipherSuites
(list)- Cipher Suites, See Cipher Suites for more information.
alpn
(list)- ALPN list
Mutual TLS authentication¶
If a CA certificate is set on the server, the client certificate will be verified, and the client must provide the certificate.
Note
Certificate information set via the command line applies only to the listener or dialer.