Messaging via Libtorrent - bittorrent

BEP50 describes Pub/Sub protocol over BitTorrent Protocol. Nevertheless, the BEP is not implemented in the LibTorrent. Are there any options for nodes to exchange messages via LibTorrent?

Related

Is there a way to stream call to a remote websocket Server on Freeswitch?

I want to stream calls on freeswitch to a node.js websocket server (url: wss//localhost:8755/{callUUID})
The only thing I can find is using mod_shout to stream to an icecast server.
<action application="record" data="shout://source:pass#10.10.10.10:8000/stream.mp3"/>
or
conference 3001-10.10.10.10 record shout://source:pass#10.10.10.10:8000/stream.mp3
Is there a way to do session_record and stream to the websocket server?
Thank you.
There are modules :
mod_unimrcp
mod_unimrcp is the FreeSWITCH module that allows communication with Media Resource Control Protocol (MRCP) servers. MRCP allows client machines to control media resources on a network. MRCP version 1 uses the Real Time Streaming Protocol (RTSP) while version 2 uses the Session Initiation Protocol (SIP) to negotiate the MRCP connection. mod_unimrcp allows FreeSWITCH to act as such a client. Servers are supplied by numerous vendors such as Cepstral, Voxeo, Nuance, and many others.
mod_vlc
<action application="record" data ="vlc://#standard{access=http,mux=raw,dst=localip:someport/somevariable}"/>
mod_rtmp
mod_rtmp is an RTMP (Real time media protocol) endpoint for FreeSWITCH. The RTMP protocol is primarily used by Flash for streaming audio, video, and data over the Internet.

How can I use BitTorrent DHT to get a P2P connection between two nodes?

I know that BitTorrent DHT can be used to coordinate torrents without the need for a tracker. Now, I would like to build a P2P network of nodes and I would prefer to avoid the hassle of developing my own discovery / signaling / handshaking / NAT traversal.
So I was wondering: is there any library (preferably nodejs) that I can use to just:
Generate an identifier on a node A.
On a node B, use A's identifier to connect to A.
Both nodes get some callback with a socket, ready to write on?
I mean, this should be somehow part of the handshaking protocol for BitTorrent, but instead of directly using the torrent protocol to send data, I would like to directly get to talk with the other node and implement my own protocol.
Is it possible?
The bittorrent DHT and the bittorrent data transfer protocol are separate things. So yes, it is possible to find other IP/Port contacts through the DHT and connect to them with a custom protocol.

Security for Coap messages

Is there any way in which the messages that are send by COAP over UDP packets can be secured ? Any open source projects that I can implement. This message exchange is with a server and the client would be an embedded device. So the cryptographic algorithm must be able to run on it too. Also I came across cyassl. But the problem is that it uses TCP protocol rather than UDP ? Any ideas ?
Thanks
DTLS can be used to secure CoAP unicast messages, however, CoAP multicast messages are not protected by the existence DTLS protocol. Because efficient key distribution problem has not been solved yet. This means the header of multicast messages might be exposed to the sniffer tool, including the URI path.
Nowadays, there is a protocol called OSCoAP might help with this. It is still in implementation.
This is the latest draft IDTF document of OSCoAP: https://datatracker.ietf.org/doc/html/draft-ietf-core-object-security-02
However, there are doubts about it. It mentions the OSCoAP will encrypt the URI path in section 4. Then key distribution still might be a problem in multicast. But it didn't mention any difficulties there. But someone who has interests in the security of CoAP messages can have a look at OSCoAP.
The way to secure CoAP is DTLS (TLS for Datagram)
The RFC is pretty clear on the subject:
https://datatracker.ietf.org/doc/rfc7252/?include_text=1
See section 9 for the details.
DTLS is simply the well-known TLS/SSL but adapted to run on UDP transport.
A nice and simple implementation for embedded device is tinydtls (http://trinydtls.sf.net)
For the server side you can use Californium and Scandium (http://eclipse.org/californium)
Encryption of data before sending lets you not bother about the transfer protocol (i.e. is it UDP, TCP etc). Of course you will need to decrypt the data on the server.
If you want transport-layer security, you should look for DTLS implementations. DTLS is a flavor of SSL/TLS designed to be run over UDP and similar transports. I am not sure if DTLS implementations exist for constrained devices, though.

What is the security of using XMPP for VoIP?

Let's say I use Jitsi to make VoIP conference calls using XMPP. What determines the security, is it a feature of the XMPP protocol itself or is it the account/server I am using (eg, www.jabber.org)? On the Jabber website they mention using SSL and TLS, would this be for VoIP?
What is the advantage of using ZRTP over just making a regular voice call through XMPP, assuming there is already some security with XMPP?
Is there a difference in using SIP vs. XMPP for voice calls, with or without ZRTP?
Thanks!
XMPP and SIP are known as "signalling protocols". They are designed to provide channels that allow two clients to communicate small packets of data with each other. SIP was designed primarily with just signalling as a goal, while XMPP was designed primarily with messaging and presence as a goal. Over time both have gradually extended into each others' realm though :)
However neither SIP nor XMPP technically carry the actual voice/video data. This is left up to other protocols, such as RTP, ZRTP, etc., which the clients use the signalling protocol to negotiate (e.g. they need to exchange IP addresses and port information, and keys for ZRTP).
This means that running your XMPP over SSL is essential for security, but it only protects the signalling part (the clients negotiating the media channel). The voice/video does not go over the XMPP channel, and must be separately protected, by using ZRTP.

What are the realtime communication protocols available for the web?

I recently came across WebSockets and my mind was blown about the possibilities they bring. I searched for a full list of such realtime (and near-realtime) communication protocols and technologies - such as XMPP, WebRTC but I couldn't find any near complete list. So please help me assemble the list here.
UPDATE: I'm looking for realtime protocols available for the web.
WebSocket
WebSocket is a web technology providing full-duplex communications channels over a single TCP connection. The WebSocket API is being standardized by the W3C, and the WebSocket protocol has been standardized by the IETF as RFC 6455.
XMPP (Jabber)
Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for message-oriented middleware based on XML (Extensible Markup Language).
WebRTC
WebRTC (Web Real-Time Communication) is an API definition being drafted by the World Wide Web Consortium (W3C) to enable browser to browser applications for voice calling, video chat and P2P file sharing without plugins.
The Bayeux Protocol
Bayeux is a protocol for transporting asynchronous messages (primarily over HTTP), with low latency between a web server and a web client.
Server-Sent Events
Server-Sent Events (SSE) are a way for server to initiate data transfer to clients after the client connects. It is used for streaming continuous or low latency messages to the client. The browser API is called EventSource.
Wave Federation Protocol
The Wave Federation Protocol (formerly Google Wave Federation Protocol) is an open protocol, extension of the Extensible Messaging and Presence Protocol (XMPP) that is used in Apache Wave. It is designed for near real-time communication between the computer supported cooperative work wave servers.
IRC
Internet Relay Chat (IRC) is a protocol for real-time Internet text messaging (chat) or synchronous conferencing. It is mainly designed for group communication in discussion forums, called channels, but also allows one-to-one communication via private message as well as chat and data transfer, including file sharing.
Real-Time Publish-Subscribe (RTPS) Protocol
The Real-Time Publish-Subscribe (RTPS) protocol is designed for use with Internet Protocol (IP) one-to-many Multicast and connectionless best-effort transports such as IP User Datagram Protocol (UDP). It enables, among other things, best-effort and reliable publish-subscribe communications for real-time applications using standard IP networks.
Socket.IO
Socket.IO is a popular library for real-time communication from a browser. Socket.IO primarily uses the WebSocket protocol, but if needed can fallback on multiple other methods, such as Adobe Flash sockets, JSONP polling, and AJAX long polling, while continuing to provide the same interface. Although it can be used as simply a wrapper for WebSocket, it provides many more features, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I/O.

Resources