-
Notifications
You must be signed in to change notification settings - Fork 158
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
Plans for DTLS 1.2 Connection ID #256
Comments
@glerchundi I would love to do this! I wasn't aware of the Connection ID work. This sounds really amazing, this could allow people to load balance WebRTC traffic finally. |
FWIW, here's an example of using CID for load balancing with an IoT protocol: https://github.com/eclipse/californium/tree/wip_dtls_cid_cluster/demo-apps/cf-extplugtest-server#built-in-dtls-connection-id-load-balancer-cluster /by @boaks |
You may check WIP - CID. |
That extension is now the upcoming RFC9146. Sure, it's more relevant for IoT than for other use-cases. My experience with it is really great. My devices are now running over a week, using deep sleeping modes, and exchanging mainly one UDP-message pair (CoAP request/response) on wakeup. Very efficient, very reliable (with CoAP retransmissions on timeout in very rare cases). I developed end of last year a zephyr dtls-cid preview (based on tinydtls feature/connection_id and a thingy 91). It's now up for a week. |
Awesome! Is that preview available somewhere? |
I plan to make it available. But I have to do some tasks ahead. |
Thanks for the heads up! Great to see community is moving! |
Hi, are there any updates on this? |
For mbedtls, yes. It's merged in the meantime. |
thanks. I haven't seen anything in pion/dtls (though I'm new to it so maybe missed it) |
Hey folks! I’m planning to work on adding support for Connection IDs in |
That is great news @hasheddan! I believe it will be pretty straight forward. On When generating data in I would love to work together on this also. Would a short audio/video call be helpful to get started? |
@Sean-Der sounds great! I'll join the Slack and give you a ping 👍🏻 |
Hi, we are also looking into this. I'm very interested in Updates about the state of the implementation. Let me know when I can help somehow. |
Just to mention: |
Also, if you have any question about RFC9146, just ask, I will try my best to answer it. |
@boaks #558 has DTLS CIDs working e2e and I would love to get some interoperability tests going! I was checking out the current tests here -- would that be a good place to add similar tests for |
Yes, but I'm not common with "go" ;-). |
The docker stuff is fine. I already had a first check of my wireshark captures. |
@boaks I can build and push one to Dockerhub for now, then I'll see about adding the machinery to this repo 👍🏻 In the meantime, I was able to get some initial testing running with the DTLS client demo app in package main
import (
"context"
"fmt"
"net"
"time"
"github.com/pion/dtls/v2"
)
func main() {
addr := &net.UDPAddr{IP: net.ParseIP("127.0.0.1"), Port: 5684}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
config := &dtls.Config{
PSK: func(hint []byte) ([]byte, error) {
fmt.Printf("Client's hint: %s \n", hint)
return []byte("secretPSK"), nil
},
PSKIdentityHint: []byte("Pion DTLS Client"),
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_PSK_WITH_AES_128_CCM_8},
ConnectContextMaker: func() (context.Context, func()) {
return context.WithTimeout(ctx, 30*time.Second)
},
ConnectionIDGenerator: dtls.RandomCIDGenerator(8),
}
listener, err := dtls.Listen("udp", addr, config)
if err != nil {
panic(err)
}
defer func() {
if err := listener.Close(); err != nil {
panic(err)
}
}()
fmt.Println("Listening")
conn, err := listener.Accept()
if err != nil {
panic(err)
}
b := make([]byte, 8192)
for {
n, err := conn.Read(b)
if err != nil {
panic(err)
}
fmt.Printf("Echoing received message: %s\n", string(b[:n]))
if _, err := conn.Write(b[:n]); err != nil {
panic(err)
}
}
} |
I was able to build and run the container. No need to push a container in a registry. |
It's pretty easy to provide a capture instead of a picture. For now, as no GO user, I'm not able to start a test server or client. But If you provide captures, I will have a look at them. |
@boaks see #558 (comment) for information about build and running a test server with connection ID support, as well as a link to a packet capture of testing with californium 👍🏻 |
Hi everyone, first of all congrats for the job you all are doing here. You got to a point where the product is really strong and reliable. 👏
Summary
Motivation
As we use DTLS 1.2 for our IoT fleet this would help using it on NATed environments.
It seems that DTLS 1.3 includes the CID also as @daenney pointed in #188.
The text was updated successfully, but these errors were encountered: