Giter Site home page Giter Site logo

How to make Pion TURN work with SSL? about turn HOT 7 CLOSED

pion avatar pion commented on August 20, 2024 1
How to make Pion TURN work with SSL?

from turn.

Comments (7)

acondura avatar acondura commented on August 20, 2024 2

Could you please show an example how we could use SSL certs with this for example https://github.com/pion/turn/tree/master/examples/turn-server/tcp?

from turn.

 avatar commented on August 20, 2024 1

Daniele thanks for the reply.
I tried PION as an alternative to COTURN. He is really very light and smart. But, forgive me, I'm not an experienced Go user.

It would be great if there were additional configuration variables in which you could insert the port, the path to the SSL key and certificate

from turn.

Sean-Der avatar Sean-Der commented on August 20, 2024 1

This is done!

The Server now accepts a slice of PacketConnConfig or ListenerConfig. With ListenerConfig you can pass anything that implements the net.Listener interface.

so pion/turn can now use the result from tls.Listen or it can use the Listener that is provide by pion/dtls

from turn.

daenney avatar daenney commented on August 20, 2024

I would expect that can be done with https://github.com/pion/dtls. You'll have to dtls.Dial() first which returns a dtls.Conn, which implements the Go standard librarynet.PacketConn interface. B/c of this you can set the returned conn from a dtls.Dial() on turn.ClientConfig.Conn. You can do the same thing for the server side by using dtls.Listen() instead.

I'm not sure if this works, but I would expect it does.

from turn.

daenney avatar daenney commented on August 20, 2024

On second thought, I might be wrong. dtls.Dial() gives us a net.Conn, not a net.PacketConn and dtls.Listen gives us a net.Listener.

from turn.

daenney avatar daenney commented on August 20, 2024

@Sean-Der You're a lot more well versed in this than I am. If I look at the code, I don't think we can just wrap pion/dtls around it and have it work, so providing easy options for it would be hard to.

What do we need to do to make it happen? And does it make sense?

from turn.

dhaminitinAltran avatar dhaminitinAltran commented on August 20, 2024

Hi has anyone used this with SSL where or how do we need to provide the certificates for configuring?

from turn.

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.