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

@@ -36,7 +36,7 @@ func TestDetectSSH(t *testing.T) {
Direction: Client,
Data: openSSHBanner,
DstPort: 22,
WantProto: ProtocolSSH,
WantType: TypeSSH,
WantConfidence: .95,
},
{
@@ -44,7 +44,7 @@ func TestDetectSSH(t *testing.T) {
Direction: Server,
Data: openSSHBanner,
SrcPort: 22,
WantProto: ProtocolSSH,
WantType: TypeSSH,
WantConfidence: .95,
},
{
@@ -52,7 +52,7 @@ func TestDetectSSH(t *testing.T) {
Direction: Server,
Data: preBannerSSH,
SrcPort: 22,
WantProto: ProtocolSSH,
WantType: TypeSSH,
WantConfidence: .95,
},
{
@@ -60,7 +60,7 @@ func TestDetectSSH(t *testing.T) {
Direction: Server,
Data: dropbearBanner,
SrcPort: 22,
WantProto: ProtocolSSH,
WantType: TypeSSH,
WantConfidence: .95,
},
{