mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-03 08:28:31 +00:00
Oops, SSL needs a different listen address..
This commit is contained in:
parent
6f13ea360c
commit
6a5bcdca4a
3 changed files with 5 additions and 7 deletions
|
@ -43,29 +43,25 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
httpServer := &http.Server{
|
||||
Addr: conf.ListenAddr,
|
||||
}
|
||||
|
||||
// logFile, err := os.OpenFile("output.log", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
|
||||
// if err != nil {
|
||||
// log.Fatal("Could not create logfile: ", err)
|
||||
// }
|
||||
|
||||
server.SetupServerAndHandle(conf, nil)
|
||||
server.SetupServerAndHandle(conf, http.DefaultServeMux)
|
||||
server.SetBuildStamp(BuildTime, BuildHash)
|
||||
|
||||
go commandLineConsole()
|
||||
|
||||
if conf.UseSSL {
|
||||
go func() {
|
||||
if err := httpServer.ListenAndServeTLS(conf.SSLCertificateFile, conf.SSLKeyFile); err != nil {
|
||||
if err := http.ListenAndServeTLS(conf.SSLListenAddr, conf.SSLCertificateFile, conf.SSLKeyFile, http.DefaultServeMux); err != nil {
|
||||
log.Fatal("ListenAndServeTLS: ", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
if err = httpServer.ListenAndServe(); err != nil {
|
||||
if err = http.ListenAndServe(conf.ListenAddr, http.DefaultServeMux); err != nil {
|
||||
log.Fatal("ListenAndServe: ", err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,6 +269,7 @@ func GenerateKeys(outputFile, serverID, theirPublicStr string) {
|
|||
var err error
|
||||
output := ConfigFile{
|
||||
ListenAddr: "0.0.0.0:8001",
|
||||
SSLListenAddr: "0.0.0.0:443",
|
||||
SocketOrigin: "localhost:8001",
|
||||
BackendURL: "http://localhost:8002/ffz",
|
||||
MinMemoryKBytes: defaultMinMemoryKB,
|
||||
|
|
|
@ -15,6 +15,7 @@ type ConfigFile struct {
|
|||
// Numeric server id known to the backend
|
||||
ServerID int
|
||||
ListenAddr string
|
||||
SSLListenAddr string
|
||||
// Hostname of the socket server
|
||||
SocketOrigin string
|
||||
// URL to the backend server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue