TurnServer | Implementation of RFC5766 and RFC5389 | TCP library

 by   evilpan C Version: Current License: Non-SPDX

kandi X-RAY | TurnServer Summary

kandi X-RAY | TurnServer Summary

TurnServer is a C library typically used in Networking, TCP applications. TurnServer has no bugs, it has no vulnerabilities and it has low support. However TurnServer has a Non-SPDX License. You can download it from GitHub.

A fork from [TurnServer is an open-source implementation of Traversal Using Relays around NAT (TURN) protocol. It aims to be compliant with RFC5766 (TURN) and RFC5389 (STUN). The TURN protocol allows a client to obtain IP addresses and ports from such a relay. It is most useful for elements behind symmetric NATs or firewalls that wish to be on the receiving end of a connection to a single peer. TURN clients can connect to TurnServer with the following protocols: UDP, TCP and TLS over TCP. Experimental DTLS support is also provided. Relaying data can be done with UDP or TCP protocol. TurnServer supports also RFC5389 (STUN Binding request), RFC6062 (relay data with TCP protocol) and RFC6156 (relay IPv6-IPv6, IPv4-IPv6 and IPv6-IPv4). TurnServer is known to work on the following systems: - GNU/Linux 2.6; - FreeBSD 7.x, 8.x.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              TurnServer has a low active ecosystem.
              It has 74 star(s) with 31 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of TurnServer is current.

            kandi-Quality Quality

              TurnServer has 0 bugs and 0 code smells.

            kandi-Security Security

              TurnServer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              TurnServer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              TurnServer has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              TurnServer releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TurnServer
            Get all kandi verified functions for this library.

            TurnServer Key Features

            No Key Features are available at this moment for TurnServer.

            TurnServer Examples and Code Snippets

            No Code Snippets are available at this moment for TurnServer.

            Community Discussions

            QUESTION

            TURN server installation on AWS EC2 free-tier instance
            Asked 2021-Oct-02 at 12:16

            I enabled all necessary ports for coturn server on my instance from security group. I also configure the turnserver.conf file correctly, but still when I added my turn server on trickleICE, it shows error 701.

            Here is my turnserver.conf:

            ...

            ANSWER

            Answered 2021-Oct-01 at 10:26

            My suggestion is to gather more information on the reasons of the failure.

            I'm assuming you're configuring the Trickle ICE application with a turn:IP:port server URL, which allows for unencrypted exchanges with TURN.

            This means you can trace on your machine, e.g. using Wireshark, and verify whether the STUN binding requests and TURN Allocate requests are being sent out to the expected TURN server's public IP and port, and whether there are responses to them being received by the browser.

            Additional checks you can do is on the TURN server side. With something like netstat -tunapl you can verify that coturn is not only running but also listening on the expected port (which should be 3478 since you left it unspecified).

            If all looks as expected, then run a trace on coturn's host while you trigger a "Gather candidates" from the Trickle ICE application. You could use something like ngrep -d any -lqtW byline port 3478 to see the activity and content exchanged.

            If coturn doesn't receive anything, then check again the EC2 instance Security Group and ensure you're allowing traffic to port 3478 UDP (and TCP). Double check the EC2 instance's public IP address is what you're using in the Trickle ICE application.

            If instead you have more than one network interface assigned to that EC2 instance, then ensure you have a listening-ip configuration item set to the correct private IP address, and an external-ip directive which includes PUBLIC_IP:PRIVATE_IP, where the public IP is the one you're trying to use and the private IP is the one coturn is listening on.

            e.g.:

            Source https://stackoverflow.com/questions/69366981

            QUESTION

            WebRTC offer is missing lots of fields
            Asked 2021-Apr-05 at 09:03

            I have a web app that plays video broadcasted using WebRTC. I'm using a COTURN simple implementation (as described here: https://gabrieltanner.org/blog/turn-server). My turnserver.conf looks like this:

            ...

            ANSWER

            Answered 2021-Apr-04 at 22:56

            I'm not sure if it was some sort of update on the RTCPeerConnection constructor (because it just stopped working without anyone touching the code), but in case anyone needs this, I solved it by adding

            Source https://stackoverflow.com/questions/66944748

            QUESTION

            What is the downside of using smaller set of UDP ports in TURN server?
            Asked 2020-Dec-24 at 01:48

            According to RFC5766, it seems that TURN server should have UDP port 49152 - 65535 open for relay.

            In all cases, the server SHOULD only allocate ports from the range 49152 - 65535 (the Dynamic and/or Private Port range [Port-Numbers]),

            However, some of the TURN servers, such as Coturn, allow you to specify even smaller set of UDP ports for relay.

            Because Docker consumes substantial amount of CPU/RAM resources when large port mappings need to be created between a container and a host, I am interested in using smaller set of ports to mitigate high resource usage when I am deploying dockerized TURN server.

            I want to know the implications of using smaller set of UDP ports, such as from 49500-50000 (Using 500 UDP ports open) vs 49152-65535 (Using ~16400 UDP ports).

            What are the downside of using smaller set of ports for relay? If there is no downside, why does TURN recommend using so many UDP ports for relay?

            ...

            ANSWER

            Answered 2020-Dec-24 at 01:48

            You can use as few ports as you want, it just limits the amount of allocations you can have.

            Each TURN Allocation (session) needs a dedicated 3-Tuple (IP/Port/Protocol)

            Source https://stackoverflow.com/questions/65432972

            QUESTION

            How to config coturn on Nginx for webRTC?
            Asked 2020-Nov-12 at 09:34

            I am making a WebRTC application which is working fine on wifi. But when I open the app on my phone via 4G the webRTC Livestream won't start. It seems something is going wrong by making the iceConnectionState.

            For the Iceserver I made a turn server with coturn on my Nginx server with the following settings:

            ...

            ANSWER

            Answered 2020-Nov-12 at 09:34

            I found a solution in this question :) I have added a /etc/nginx/conf.d/load-balancer.conf and then the turn server works

            stackoverflow question

            Source https://stackoverflow.com/questions/64765128

            QUESTION

            Angular 8 WebRTC Can't make it work on 2 tabs
            Asked 2020-Jul-08 at 08:38

            I have a task to create an audio chat room between 2 users.

            I used app example: Peer connection: audio only

            I've changed the code to TypeScript, and it works:

            Stackblitz

            But I can't make it work between two users (not in one tab; I open 2 firefox windows). I have only very basic knowledge of Angular. To be honest, I'm not an Angular developer and normally I write desktop apps, but I need to develop this app with Angular.

            I need to send an offer event to a communication platform(to a room with another user - it's always 2 users in the room). It needs a type: offer and sdp.

            Other user responds with an answer event to the same platform, to the same room. It also needs sdp, and type set to answer.

            We use matrix.org. Here's VOIP specs

            I have already implemented sending these events to a communication platform, I read events from the room, and if there's a call offer event, I can answer with an answer event, but I can't make it work.

            I've tried to make it work, so I had to work on last weekend, but there's always some issue like DOMException: "Cannot set remote answer in state stable" etc.

            Of course I don's ask for a working code(I know it's a work for few days), but I would appreciate any advice to help me implement it, make it easier and possible for someone with very basic knowledge of Angular and webRTC.

            Oh, and I'm not sure why, but this stackblitz example doesn't work in Chrome for me, but it works in firefox.

            //EDIT

            I'm still trying to find a solution. I try to do something like this now:

            ...

            ANSWER

            Answered 2020-Jul-08 at 08:38

            Ok, I did this by doing these things:

            1. Added adapter.js, so now it works in different browsers.
            2. I added ontrack to make audio works
            3. I create an offer, then set codecs and local description(I need to do this before I send an event to matrix room, to send candidates)
            4. When there's no more candidates I send an offer event to matrix room.
            5. When I see an offer event, I set remote description to the remote offer
            6. I create an answer, set codecs, and then local description and I send an answer event to the room.
            7. When there's answer event in the room i set remote description to that event

            I know this list is not very helpful, but maybe it will help someone.

            Source https://stackoverflow.com/questions/62754030

            QUESTION

            coTURN unable to do a handshake in Mozilla Firefox
            Asked 2020-Apr-20 at 17:08

            I have a web and standalone applications that use WebRTC. I have my own coturn server on Amazon EC2. I configure everything based on that article (maybe it was a mistake?). I test my apps with this stun/turn server and everything works just fine for Chrome, Edge, Safari, but does not work for Mozilla Firefox (Offer and Answer were generated). I received the following error in a console:

            ...

            ANSWER

            Answered 2020-Apr-20 at 17:08

            You should double-check your internal routes defined in AWS for an EC2 instance and some global one about inbound traffic. Mozilla Firefox would be the only one that would fail to do the "handshake" if the stun/turn server is not available outside of the internal network. Chrome, EDGE, Safari would work in such a situation and establish a P2P (srflx) connection.

            In my situation, there was some additional definition of inbound traffic to all of the AWS instances, which were blocking the traffic to the stun/turn server. I realize that when I was trying to test the WebRTC from one computer (connected to a VPN) to another (not connected to a VPN) and it fails while doing a "handshake".

            Source https://stackoverflow.com/questions/61012255

            QUESTION

            Coturn stun server returned an error with code=701
            Asked 2020-Apr-03 at 09:19

            I have my own server with ubuntu 19.

            NOTE: I need a stun/turn server for a video chat web application. It works already if both devices are in the same network.

            I have successfully installed and configured coturn. I can successfully start the turnserver by running: turnserver or nohup turnserver & in the terminal.

            NOTE: I have an SSH connection to my server.

            I also ensured that the necessary ports are open and checked them with netstat -tulpn.

            I have been also restarting coturn a few times while testing sudo service coturn restart.

            I use these configurations in the turnserver.conf:

            ...

            ANSWER

            Answered 2020-Apr-03 at 09:19

            Okay. I was looking at the whole thing from the wrong angle. The TURN/STUN server setup is correct.

            The issue is with the client/server code. The signaling does not work.

            I followed this article, but I have problems to setup the signaling service. I think this must be asked in a new question.

            Source https://stackoverflow.com/questions/60967926

            QUESTION

            How does a STUN server know whether short-term or long-term credentials were used for sending the STUN request?
            Asked 2020-Feb-10 at 20:19

            RFC 5389 allows one of two forms of authentication for STUN servers:

            ...

            ANSWER

            Answered 2020-Feb-10 at 20:19

            TURN allocations are always done using the long-term credential mechanism, see https://tools.ietf.org/html/rfc5766#section-2.2

            STUN requests to STUN servers typically do not require authentication.

            The short-term credentials mechanism is used for other things like ICE, see https://tools.ietf.org/html/rfc5245#section-4.3

            Source https://stackoverflow.com/questions/60157708

            QUESTION

            Webrtc connection over turn strange behavior with relay candidates
            Asked 2020-Jan-28 at 08:32

            I have two clients communicating over webrtc. (Client A writen in js, Client B in Python with aiortc). Now it happens that Client A wants to connect from a mobile Network thus it requires a turn-relay connection.

            I have already setup a turn server which seems to do his job. But only approx 50% of the connections succeed now. I already found out when they succeed and when they fail:

            SDP relay information in case of success:
            Offer Client A

            ...

            ANSWER

            Answered 2020-Jan-28 at 08:32

            It seems like our turn server was missconfigured.
            I can not tell what was misconfigured, because sadly I have no access to the configuration of the turn server.
            But I tested by deploying some turn servers on my local machine and they behaved similar when they where not correctly configured. By looking into the logs of thos turn servers I saw 401 Unauthorized popping up all the time. So I changed the configuration, until the authorization was working. With this config we deployed a new server which is now working.

            Some words on the configuration for people also having troubles with that on the first run, those are the configurations we put into /etc/turnserver.conf and passed it when starting the server with turnserver -v -c /etc/turnserver.conf:

            Source https://stackoverflow.com/questions/59921395

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install TurnServer

            TurnServer requires following libraries:. TurnServer is written in pure C according to the C99 and POSIX + XSI standards. Thus it should be compiled on all POSIX systems which have realtime signals support.
            libconfuse development files (version >= 2.6);
            libssl development files;
            librt (normally included in Linux and BSD distribution).

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/evilpan/TurnServer.git

          • CLI

            gh repo clone evilpan/TurnServer

          • sshUrl

            git@github.com:evilpan/TurnServer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TCP Libraries

            masscan

            by robertdavidgraham

            wait-for-it

            by vishnubob

            gnet

            by panjf2000

            Quasar

            by quasar

            mumble

            by mumble-voip

            Try Top Libraries by evilpan

            jni_helper

            by evilpanC++

            gptcli

            by evilpanPython

            Airkiss

            by evilpanC

            hidemyass

            by evilpanC