disable HTTP/2 since it's not upgradeable to tunnel

This commit is contained in:
Vladislav Yarmak 2020-05-24 01:51:19 +03:00
parent 79b05151ca
commit e96356bdaa
1 changed files with 7 additions and 4 deletions

11
main.go
View File

@ -7,6 +7,7 @@ import (
"flag"
"time"
"net/http"
"crypto/tls"
)
func perror(msg string) {
@ -62,10 +63,12 @@ func run() int {
return 3
}
var server http.Server
server.Addr = args.bind_address
server.Handler = NewProxyHandler(args.timeout, auth, proxyLogger)
server.ErrorLog = log.New(logWriter, "HTTPSRV : ", log.LstdFlags | log.Lshortfile)
server := http.Server{
Addr: args.bind_address,
Handler: NewProxyHandler(args.timeout, auth, proxyLogger),
ErrorLog: log.New(logWriter, "HTTPSRV : ", log.LstdFlags | log.Lshortfile),
TLSNextProto: make(map[string]func(*http.Server, *tls.Conn, http.Handler)), // No HTTP/2
}
mainLogger.Info("Starting proxy server...")
if args.cert != "" {