Improve error message when local DoH is enabled without a certificate
Fixes #1136
This commit is contained in:
parent
5c37d3b9de
commit
6fb42d0eae
|
@ -61,6 +61,9 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht
|
|||
|
||||
func (proxy *Proxy) localDoHListener(acceptPc *net.TCPListener) {
|
||||
defer acceptPc.Close()
|
||||
if len(proxy.localDoHCertFile) == 0 || len(proxy.localDoHCertKeyFile) == 0 {
|
||||
dlog.Fatal("A certificate and a key are required to start a local DoH service")
|
||||
}
|
||||
noh2 := make(map[string]func(*http.Server, *tls.Conn, http.Handler))
|
||||
httpServer := &http.Server{
|
||||
ReadTimeout: proxy.timeout,
|
||||
|
|
Loading…
Reference in New Issue