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

@@ -38,7 +38,7 @@ database:
type: mysql
user: root
# password: "1000omc@kp!"
# host: "192.168.5.57"
# host: "192.168.2.166"
# port: 33066
# name: omc_db
backup: d:/local.git/ems.agt/restagent/database
@@ -62,7 +62,7 @@ redis:
password: ""
db: 0 # Redis db_num
# 多个数据源时可以用这个指定默认的数据源
defaultDataSourceName: "default"
defaultDataSourceName: "default"
# upfHeaderLength: spare upf buffer, must destroy
mml:
@@ -76,7 +76,7 @@ mml:
# NE config
ne:
user: agtuser
user: root
etcdir: /usr/local/etc
bindir: /usr/local/bin
omcdir: /usr/local/omc
@@ -97,7 +97,7 @@ omc:
vendor: ""
dn: 4600
chk2ne: false
sn: 13750650
sn: "-"
checksign: false
rootDir: ./
binDir: ./bin

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project
PROJECT = OMC
VERSION = 2.2312.8
VERSION = 2.2312.10
PLATFORM = amd64
ARMPLATFORM = aarch64
BUILDDIR = ../../build

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 {