initTLSConfig inits the TLS config.
(config *proxy.Config)
| 327 | |
| 328 | // initTLSConfig inits the TLS config. |
| 329 | func (conf *configuration) initTLSConfig(config *proxy.Config) (err error) { |
| 330 | if conf.TLSCertPath != "" && conf.TLSKeyPath != "" { |
| 331 | var tlsConfig *tls.Config |
| 332 | tlsConfig, err = newTLSConfig(conf) |
| 333 | if err != nil { |
| 334 | return fmt.Errorf("loading TLS config: %w", err) |
| 335 | } |
| 336 | |
| 337 | config.TLSConfig = tlsConfig |
| 338 | } |
| 339 | |
| 340 | return nil |
| 341 | } |
| 342 | |
| 343 | // initDNSCryptConfig inits the DNSCrypt config. config must not be nil. |
| 344 | func (conf *configuration) initDNSCryptConfig(config *proxy.Config) (err error) { |
no test coverage detected