Merge pull request #153 in DNS/adguard-dns from fix/595 to master

* commit '2dc2a0946a28f41736228db1065654716907c5b8':
  Fix #595 - Start using GO 1.12
This commit is contained in:
Alexey Dmitrievskiy
2019-02-28 18:05:27 +03:00
4 changed files with 17 additions and 4 deletions

11
app.go
View File

@@ -69,6 +69,9 @@ func run(args options) {
// configure log level and output
configureLogger(args)
// enable TLS 1.3
enableTLS13()
// print the first message after logger is configured
log.Printf("AdGuard Home, version %s\n", VersionString)
log.Debug("Current working directory is %s", config.ourWorkingDir)
@@ -293,6 +296,14 @@ func configureLogger(args options) {
}
}
// TODO after GO 1.13 release TLS 1.3 will be enabled by default. Remove this afterward
func enableTLS13() {
err := os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1")
if err != nil {
log.Fatalf("Failed to enable TLS 1.3: %s", err)
}
}
func cleanup() {
log.Info("Stopping AdGuard Home")