mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-06 06:10:54 +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)
|
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)
|
// logFile, err := os.OpenFile("output.log", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
// log.Fatal("Could not create logfile: ", err)
|
// log.Fatal("Could not create logfile: ", err)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
server.SetupServerAndHandle(conf, nil)
|
server.SetupServerAndHandle(conf, http.DefaultServeMux)
|
||||||
server.SetBuildStamp(BuildTime, BuildHash)
|
server.SetBuildStamp(BuildTime, BuildHash)
|
||||||
|
|
||||||
go commandLineConsole()
|
go commandLineConsole()
|
||||||
|
|
||||||
if conf.UseSSL {
|
if conf.UseSSL {
|
||||||
go func() {
|
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)
|
log.Fatal("ListenAndServeTLS: ", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = httpServer.ListenAndServe(); err != nil {
|
if err = http.ListenAndServe(conf.ListenAddr, http.DefaultServeMux); err != nil {
|
||||||
log.Fatal("ListenAndServe: ", err)
|
log.Fatal("ListenAndServe: ", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,6 +269,7 @@ func GenerateKeys(outputFile, serverID, theirPublicStr string) {
|
||||||
var err error
|
var err error
|
||||||
output := ConfigFile{
|
output := ConfigFile{
|
||||||
ListenAddr: "0.0.0.0:8001",
|
ListenAddr: "0.0.0.0:8001",
|
||||||
|
SSLListenAddr: "0.0.0.0:443",
|
||||||
SocketOrigin: "localhost:8001",
|
SocketOrigin: "localhost:8001",
|
||||||
BackendURL: "http://localhost:8002/ffz",
|
BackendURL: "http://localhost:8002/ffz",
|
||||||
MinMemoryKBytes: defaultMinMemoryKB,
|
MinMemoryKBytes: defaultMinMemoryKB,
|
||||||
|
|
|
@ -15,6 +15,7 @@ type ConfigFile struct {
|
||||||
// Numeric server id known to the backend
|
// Numeric server id known to the backend
|
||||||
ServerID int
|
ServerID int
|
||||||
ListenAddr string
|
ListenAddr string
|
||||||
|
SSLListenAddr string
|
||||||
// Hostname of the socket server
|
// Hostname of the socket server
|
||||||
SocketOrigin string
|
SocketOrigin string
|
||||||
// URL to the backend server
|
// URL to the backend server
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue