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

@@ -42,11 +42,11 @@ func main() {
if p == nil {
return errors.New("no protocol detected")
}
if !accept[p.Name] {
return fmt.Errorf("protocol %s is not accepted", p.Name)
if !accept[p.Type] {
return fmt.Errorf("protocol %s is not accepted", p.Type)
}
fmt.Fprintf(os.Stderr, "Accepting protocol %s version %s initiated by %s\n",
p.Name, p.Version, dir)
p.Type, p.Version, dir)
return nil
})
defer func() { _ = c.Close() }()