mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-27 18:18:43 +00:00
use secure ssl configuation
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"crypto/tls"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"flag"
|
||||
@@ -618,7 +619,22 @@ func main() {
|
||||
initCaptcha(hash)
|
||||
router := e.setupRouter()
|
||||
router = e.setupConfRouter(router)
|
||||
srv := &http.Server{Addr: cfg.Server.Host + ":" + cfg.Server.Port, Handler: reqMiddleware(router)}
|
||||
tlsConfig := &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
CipherSuites: []uint16{
|
||||
tls.TLS_AES_256_GCM_SHA384,
|
||||
tls.TLS_CHACHA20_POLY1305_SHA256,
|
||||
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
||||
//tls.TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
|
||||
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
|
||||
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
|
||||
//tls.TLS_DHE_RSA_WITH_AES_256_CCM_8,
|
||||
//tls.TLS_DHE_RSA_WITH_AES_256_CCM,
|
||||
//tls.TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
|
||||
//tls.TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
|
||||
},
|
||||
}
|
||||
srv := &http.Server{Addr: cfg.Server.Host + ":" + cfg.Server.Port, Handler: reqMiddleware(router), TLSConfig: tlsConfig}
|
||||
|
||||
stop := make(chan os.Signal, 2)
|
||||
signal.Notify(stop, os.Interrupt, syscall.SIGTERM)
|
||||
|
||||
Reference in New Issue
Block a user