latysheff / node-sctp

SCTP userspace sockets for Node.js
MIT License
59 stars 10 forks source link

SCTP encapsulation UDP/DTLS #2

Closed reklatsmasters closed 6 years ago

reklatsmasters commented 6 years ago

Are you working on sctp?

latysheff commented 6 years ago

I am working on higher level protocols. Don't have any issues with current node-sctp for dev environment. Will return to SCTP if there is demand from users or if will stumble upon bugs in my development. Feel free to propose what should be improved first.

reklatsmasters commented 6 years ago

@latysheff For several months I'm working on webrtc on pure js. I made stun module. Currently, I'm working on dtls 💪🏻. I suggest you make sctp over udp (will be in pure js). It will really helps me!

latysheff commented 6 years ago

@reklatsmasters SCTP is a transport layer protocol (https://en.wikipedia.org/wiki/Transport_layer), working on the same level as TCP and UDP. By the way, I've noticed that SCTP addon for nodejs appeared https://www.npmjs.com/package/sctp-addon, so you can probably use SCTP directly from node.

reklatsmasters commented 6 years ago

SCTP is a transport layer protocol

Yes, I known. But webrtc used sctp over udp to avoid problems with routers.

SCTP addon...

This module doesn't have any examples, documentation and link to the repo. In addition, this is native module.

Also, if you want to make native module, you can make binding to https://github.com/sctplab/usrsctp. This library used in chrome and Firefox as sctp layer.

latysheff commented 6 years ago

Can you send me example pcap file of encapsulated SCTP? And do you mean this RFC for SCTP over UDP https://tools.ietf.org/html/rfc6951 ?

reklatsmasters commented 6 years ago

And do you mean this RFC for SCTP over UDP https://tools.ietf.org/html/rfc6951 ?

Probably yes.

Can you send me example pcap file of encapsulated SCTP?

The main problem is that sctp encapsulated over dtls. There is no way to disable dtls 😔. I haven't access to my pc to send you pcap file right now. But you can use my simple webrtc server to record session https://github.com/reklatsmasters/webrtc-examples/tree/master/01-simple-console-example. Start: node server.js. Server will started on 7000 port. Open localhost:7000 in 2 tabs and record session using wireshark.

reklatsmasters commented 6 years ago

@latysheff I found another draft RFC that described sctp over dtls https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-dtls-encaps-09.

latysheff commented 6 years ago

I have no idea how to get DTLS layer for SCTP. What module, what snippet to get working socket? UDP is much easier (probably) but I suppose it is useless if DTLS is required. You can write me on Skype (the same login as on here github) to discuss it further.

latysheff commented 6 years ago

done