ing
This commit is contained in:
parent
1236a2644c
commit
bff5ba7043
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
cnsm "git.loafle.net/commons/service_matcher-go"
|
||||
cuej "git.loafle.net/commons/util-go/encoding/json"
|
||||
ocmm "git.loafle.net/overflow/commons-go/model/meta"
|
||||
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
|
||||
"git.loafle.net/overflow/crawler-go"
|
||||
)
|
||||
|
@ -33,16 +34,16 @@ func (s *SocketHealthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Con
|
|||
|
||||
network := ""
|
||||
switch metaIPTypeKey {
|
||||
case "V6":
|
||||
case ocmm.MetaIPTypeEnumV4.String():
|
||||
switch metaPortTypeKey {
|
||||
case "UDP":
|
||||
case ocmm.MetaPortTypeEnumUDP.String():
|
||||
network = "udp6"
|
||||
default:
|
||||
network = "tcp6"
|
||||
}
|
||||
default:
|
||||
switch metaPortTypeKey {
|
||||
case "UDP":
|
||||
case ocmm.MetaPortTypeEnumUDP.String():
|
||||
network = "udp"
|
||||
default:
|
||||
network = "tcp"
|
||||
|
@ -54,7 +55,7 @@ func (s *SocketHealthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Con
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if metaCryptoTypeKey == "TLS" {
|
||||
if metaCryptoTypeKey == ocmm.MetaCryptoTypeEnumTLS.String() {
|
||||
cfg := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
ServerName: ip,
|
||||
|
|
Loading…
Reference in New Issue
Block a user