check remote service

This commit is contained in:
TenderIronh
2024-07-26 22:07:48 +08:00
parent 9dda148232
commit 2dea3a718d
8 changed files with 105 additions and 58 deletions
+8 -1
View File
@@ -10,7 +10,7 @@ import (
"time"
)
const OpenP2PVersion = "3.18.4"
const OpenP2PVersion = "3.19.0"
const ProductName string = "openp2p"
const LeastSupportVersion = "3.0.0"
const SyncServerTimeVersion = "3.9.0"
@@ -108,6 +108,7 @@ const (
MsgPushReportGoroutine = 16
MsgPushReportMemApps = 17
MsgPushServerSideSaveMemApp = 18
MsgPushCheckRemoteService = 19
)
// MsgP2P sub type message
@@ -143,6 +144,7 @@ const (
MsgReportApps
MsgReportLog
MsgReportMemApps
MsgReportResponse
)
const (
@@ -510,6 +512,11 @@ type ServerSideSaveMemApp struct {
AppID uint64 `json:"appID,omitempty"`
}
type CheckRemoteService struct {
Host string `json:"host,omitempty"`
Port uint32 `json:"port,omitempty"`
}
const rootCA = `-----BEGIN CERTIFICATE-----
MIIDhTCCAm0CFHm0cd8dnGCbUW/OcS56jf0gvRk7MA0GCSqGSIb3DQEBCwUAMH4x
CzAJBgNVBAYTAkNOMQswCQYDVQQIDAJHRDETMBEGA1UECgwKb3BlbnAycC5jbjET