nodertc / is-stun

Check if a Buffer is a STUN message.
MIT License
0 stars 0 forks source link

Shouldn't it also check STUN magic cookie? #1

Closed ibc closed 5 years ago

ibc commented 5 years ago

I mean this.

reklatsmasters commented 5 years ago

Magic cookie is part of rfc5389. So, i want to leave ability to detect RFC3489 messages.

The magic cookie field MUST contain the fixed value 0x2112A442 in network byte order. In RFC 3489 [RFC3489], this field was part of the transaction ID; placing the magic cookie in this location allows a server to detect if the client will understand certain attributes that were added in this revised specification.

ibc commented 5 years ago

Fair. I understood this library was focused on RFC 5389.