1
0

marge: 合并代码

This commit is contained in:
TsMask
2023-12-29 20:22:43 +08:00
parent 615ab2eb2e
commit 3c5c77b881
39 changed files with 1571 additions and 289 deletions

View File

@@ -197,7 +197,15 @@ func main() {
} else {
go HttpListen(listen, app)
}
}
if rest.IPv4 != "0.0.0.0" {
// 默认启动localhost侦听
listenLocal := "127.0.0.1" + ":" + strconv.Itoa(int(rest.Port))
if strings.ToLower(rest.Scheme) == "https" {
go HttpListenTLS(listenLocal, rest.CaFile, rest.CertFile, rest.KeyFile, app)
} else {
go HttpListen(listenLocal, app)
}
}
// ipv6 goroutines
if rest.IPv6 != "" {
@@ -208,6 +216,16 @@ func main() {
go HttpListen(listenv6, app)
}
}
// if rest.IPv6 != "::" {
// // 默认启动localhost侦听
// listenv6Local := "[" + "::1" + "]" + ":" + strconv.Itoa(int(rest.Port))
// if strings.ToLower(rest.Scheme) == "https" {
// go HttpListenTLS(listenv6Local, rest.CaFile, rest.CertFile, rest.KeyFile, app)
// } else {
// go HttpListen(listenv6Local, app)
// }
// }
}
if conf.WebServer.Enabled {