[jitsi-dev] Using ice4j in a WebRTC DataChannel setup


#1

Hi Guys,

I am writing my thesis about WebRTC DataChannels. I was wondering if I could use ice4j on a Java server to tunnel ice'd UDP over DTLS over SCTP with a WebRTC DataChannel client.

In the current setup I have running I manually respond to turn requests, https://github.com/IIlllII/bitbreeds-webrtc/blob/master/webrtc-signaling/src/main/java/com/bitbreeds/webrtc/signaling/BindingService.java (I am not the original author of the repository). Would it be possible to replace this logic with ice4j.

If my understanding is correct this would mean that all the STUN & TURN logic are done under the hood by ice4j, eventually returning an UDP socket with which you can use to communicate with the ‘other’ side. Creating a SCTP network link on top of that UDP socket wouldn’t be much of an issue than. I would be using SDP, since this is also used by WebRTC, to notify the other end of the connection with the different ICE candidates I have.

Could you give me any directions on whether this setup is possible? I’m having trouble extrapolating a working demo on the available examples found online, which is due to my inexperience.

Thanks in advance.

Best wishes,

Hector


#2

Hector, you can certainly do this, but you'll need quite a bit more than
just ice4j as it does not do DTLS nor SCTP. Grabbing the latest libjitsi
will get you most of the way there, but best of luck sorting out just the
parts you want for DataChannel. Oh yeah, you'll need a means to signal your
SDP etc as well; fun times.

Best of luck,
Paul

···

On Sat, May 19, 2018 at 7:04 AM Hector Stenger <hector@orti.works> wrote:

Hi Guys,

I am writing my thesis about WebRTC DataChannels. I was wondering if I
could use ice4j on a Java server to tunnel ice'd UDP over DTLS over SCTP
with a WebRTC DataChannel client.

In the current setup I have running I manually respond to turn requests,
https://github.com/IIlllII/bitbreeds-webrtc/blob/master/webrtc-signaling/src/main/java/com/bitbreeds/webrtc/signaling/BindingService.java (I
am not the original author of the repository). Would it be possible to
replace this logic with ice4j.

If my understanding is correct this would mean that all the STUN & TURN
logic are done under the hood by ice4j, eventually returning an UDP socket
with which you can use to communicate with the ‘other’ side. Creating a
SCTP network link on top of that UDP socket wouldn’t be much of an issue
than. I would be using SDP, since this is also used by WebRTC, to notify
the other end of the connection with the different ICE candidates I have.

Could you give me any directions on whether this setup is possible? I’m
having trouble extrapolating a working demo on the available examples found
online, which is due to my inexperience.

Thanks in advance.

Best wishes,

Hector
_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Hi Hector,

I would suggest looking at the implementation in jitsi-videobridge,
specifically SctpConnection.java and IceUdpTransportManager.java as an
example. In short, it uses ice4j to do the ICE part. SctpConnection
then reads from the DatagramSocket provided by ice4j and passes the
data through a DtlsPacketTransformer (from libjitsi) for the DTLS
layer. It then uses the SctpSocket wrapper (again from libjitsi) for
the SCTP layer. It shouldn't be hard to implement something similar
yourself, but as Paul mentioned getting the signaling to work will be
"fun".

Regards,
Boris

···

On Thu, May 17, 2018 at 3:15 AM, Hector Stenger <hector@orti.works> wrote:

Hi Guys,

I am writing my thesis about WebRTC DataChannels. I was wondering if I could
use ice4j on a Java server to tunnel ice'd UDP over DTLS over SCTP with a
WebRTC DataChannel client.

In the current setup I have running I manually respond to turn requests,
https://github.com/IIlllII/bitbreeds-webrtc/blob/master/webrtc-signaling/src/main/java/com/bitbreeds/webrtc/signaling/BindingService.java
(I am not the original author of the repository). Would it be possible to
replace this logic with ice4j.

If my understanding is correct this would mean that all the STUN & TURN
logic are done under the hood by ice4j, eventually returning an UDP socket
with which you can use to communicate with the ‘other’ side. Creating a SCTP
network link on top of that UDP socket wouldn’t be much of an issue than. I
would be using SDP, since this is also used by WebRTC, to notify the other
end of the connection with the different ICE candidates I have.

Could you give me any directions on whether this setup is possible? I’m
having trouble extrapolating a working demo on the available examples found
online, which is due to my inexperience.

Thanks in advance.

Best wishes,

Hector

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev