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