diff --git a/README.md b/README.md index a87f7f5e6a609442ef578458e4c1650a777c0653..606a338aad9b48fbef7f49c1c3179e07ece20592 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ server: keyFile: key.pem # gateway address advertised in the rdp files gatewayAddress: localhost - # port to listen on + # port to listen on (change to 80 or equivalent if not using TLS) port: 443 # list of acceptable desktop hosts to connect to hosts: diff --git a/cmd/rdpgw/main.go b/cmd/rdpgw/main.go index 3ca4c20b8d8ad35181879058252aed18173e6bc4..1736a8f641b741a9e2cf267ce7c2d94f8a1811b5 100644 --- a/cmd/rdpgw/main.go +++ b/cmd/rdpgw/main.go @@ -143,7 +143,11 @@ func main() { http.HandleFunc("/tokeninfo", api.TokenInfo) http.HandleFunc("/callback", api.HandleCallback) - err = server.ListenAndServeTLS("", "") + if conf.Server.DisableTLS { + err = server.ListenAndServe() + } else { + err = server.ListenAndServeTLS("", "") + } if err != nil { log.Fatal("ListenAndServe: ", err) }