Giter Site home page Giter Site logo

Comments (13)

paullouisageneau avatar paullouisageneau commented on May 11, 2024

Hi,

Setting a STUN server won't have any impact on TCP candidates, you should always get direct TCP candidates.
It's not normal that you can't get TURN-TCP candidates, libnice should support it, at least according to the documentation. What TURN server have you tried with? Does it have TCP support enabled?

from libdatachannel.

murat-dogan avatar murat-dogan commented on May 11, 2024

I am using coturn server & yes TCP enabled.

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on May 11, 2024

It might be a libnice issue then. I'll do some tests on my side.

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on May 11, 2024

@murat-dogan Do you get TCP relay candidates on this test page?
https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/

from libdatachannel.

murat-dogan avatar murat-dogan commented on May 11, 2024

No all of them is UDP.
It is strange.

from libdatachannel.

murat-dogan avatar murat-dogan commented on May 11, 2024

I opened an issue at libnice for that.

There is another ICE implementation library called pjsip,
It is clearly written that they support Turn TCP connection at here.
https://trac.pjsip.org/repos/wiki/get-around-nat-blocked-traffic-filtering

I don't know exact situation for libnice.

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on May 11, 2024

OK, for reference: https://gitlab.freedesktop.org/libnice/libnice/issues/97

PJNATH (the ICE tools part from PJSIP) looks good and feature-complete, however it's under GPL, which means integrating it would require changing the license from LGPL to GPL.

from libdatachannel.

murat-dogan avatar murat-dogan commented on May 11, 2024

Did you have any time to investigate for this subject?
What do you think , Is libnice support this feature?

For PJSIP;
I compiled their iceserver sample located in pjsip-apps/bin/samples/x86_64-unknown-linux-gnu.

Tried to get Turn Relay TCP Candidates, but could not.
I changed turn server & tried again, but got same result.

I am stuck.

I think I am missing something basic but could not figured out yet.

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on May 11, 2024

Yes, since it didn't work I dug up a bit.

It appears RFC 5766, the original TURN specification, only considers TCP and TLS/TCP as a way to contact a TURN server. Data relayed between peers is always over TCP (see https://tools.ietf.org/html/rfc5766#section-2.1), and the extension for TURN TCP relaying between peers seems to have stayed an abandoned draft which doesn't seem to be widely implemented: https://tools.ietf.org/html/draft-ietf-behave-turn-tcp-07

The only use case where WebRTC officially supports ICE TCP is browser-to-server with active TCP candidates on browser side, browser-to-browser (and therefore browser-to-browser via relay) are not supported.

Sadly for your use case, this means TURN TCP relay candidates might not be supported in a lot of situations. Anyway, you could get the same result with secure websockets with far less useless overhead, couldn't you?

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on May 11, 2024

TCP relay candidates seem to be implemented in coturn, so what's missing here is more precisely TCP relay support in libnice. However, for browser support I think it'd be another story entirely.

from libdatachannel.

murat-dogan avatar murat-dogan commented on May 11, 2024

Yes, since it didn't work I dug up a bit.

It appears RFC 5766, the original TURN specification, only considers TCP and TLS/TCP as a way to contact a TURN server. Data relayed between peers is always over TCP (see https://tools.ietf.org/html/rfc5766#section-2.1), and the extension for TURN TCP relaying between peers seems to have stayed an abandoned draft which doesn't seem to be widely implemented: https://tools.ietf.org/html/draft-ietf-behave-turn-tcp-07

The only use case where WebRTC officially supports ICE TCP is browser-to-server with active TCP candidates on browser side, browser-to-browser (and therefore browser-to-browser via relay) are not supported.

Sadly for your use case, this means TURN TCP relay candidates might not be supported in a lot of situations. Anyway, you could get the same result with secure websockets with far less useless overhead, couldn't you?

Thanks for comments. I will investigate another way. Maybe websocket.

from libdatachannel.

murat-dogan avatar murat-dogan commented on May 11, 2024

You can close the issue

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on May 11, 2024

OK ! I think websockets are especially interesting if you combine signaling and relaying over the same connection.

from libdatachannel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.