diff --git a/README.md b/README.md index a87f7f5..606a338 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 3ca4c20..1736a8f 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) }