Refactoring

Refactored Protocol.Name -> Protocol.Type; added Encapsulation field
Refactored TLS parsing; added support for ALPN
This commit is contained in:
2025-10-10 12:41:44 +02:00
parent f86a7f7a67
commit 81a3829382
20 changed files with 366 additions and 141 deletions

View File

@@ -53,7 +53,7 @@ func TestDetectMQTT(t *testing.T) {
Direction: Client,
Data: validSimplePacket,
DstPort: 1883,
WantProto: ProtocolMQTT,
WantType: TypeMQTT,
WantConfidence: .99,
},
{
@@ -61,7 +61,7 @@ func TestDetectMQTT(t *testing.T) {
Direction: Client,
Data: validFullPacket,
DstPort: 1883,
WantProto: ProtocolMQTT,
WantType: TypeMQTT,
WantConfidence: .99,
},
{
@@ -69,7 +69,7 @@ func TestDetectMQTT(t *testing.T) {
Direction: Client,
Data: partialPacket,
DstPort: 1883,
WantProto: ProtocolMQTT,
WantType: TypeMQTT,
WantConfidence: .5,
},
{
@@ -77,7 +77,7 @@ func TestDetectMQTT(t *testing.T) {
Direction: Client,
Data: trailingGarbagePacket,
DstPort: 1883,
WantProto: ProtocolMQTT,
WantType: TypeMQTT,
WantConfidence: .75,
},
}