-
Notifications
You must be signed in to change notification settings - Fork 177
Allow intercepting and injecting DTLS packets #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
which allows embedding them into STUN.
d60f060 to
a743812
Compare
conn.go
Outdated
|
|
||
| var rawPackets [][]byte | ||
|
|
||
| // TODO: this is not quite correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"writePackets" is an odd name, this writes a series of records? Intercepting here is wrong since the goal is to intercept the handshake packets, not the individual records.
Theoretically handshake and non-handshake records could be mixed but I think that isn't allowed (at least in DTLS 1.2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best way I came up with so far is to split the handling of handshake packets into a writeHandshakePackets (which seems like a general improvement) and call that from handshaker.go -- done in f501150
conn.go
Outdated
| // We need the full packets for SPED so we can crc32 them (at least the ones | ||
| // received in plain!) | ||
| } | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same problem as above, this is about records, not packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise, readAndBuffer already has a hasHandshake which could be used for an inbound interceptor (which should only be used to to let the piggybacking controller calculate and store the crc32).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
787aa43 adds an inbound notifier (which can not intercept packets)
f501150 to
009f89e
Compare
16f2df2 to
787aa43
Compare
which allows embedding them into STUN.