🐛 fix: 修复一直报警SSL证书问题

This commit is contained in:
naiba 2021-01-16 15:08:33 +08:00
parent 4b6740e6e0
commit cb207580cf
3 changed files with 9 additions and 2 deletions

View File

@ -182,6 +182,12 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
## 变更日志
`dashboard 0.2.2` `agent 0.2.2`
- `dashboard 0.2.2`
- 修复一直报警SSL证书问题
- `agent 0.2.2`
- 修复双栈IP只能获取到v6的问题 #61

View File

@ -26,7 +26,7 @@ var SortedServerList []*model.Server
var ServerLock sync.RWMutex
var Version = "v0.2.1"
var Version = "v0.2.2"
func ReSortServer() {
SortedServerList = []*model.Server{}

View File

@ -30,9 +30,10 @@ func (s *NezhaHandler) ReportTask(c context.Context, r *pb.TaskResult) (*pb.Rece
// 证书错误提醒
errMsg = r.GetData()
} else {
var oldSSLCert = strings.Split(last.Data, "|")
var splits = strings.Split(r.GetData(), "|")
// 证书变更提醒
if last.Data != "" && last.Data != splits[0] {
if last.Data != "" && oldSSLCert[0] != splits[0] {
errMsg = fmt.Sprintf(
"SSL证书变更%s%s。",
last.Data, splits[0])