• Stars
    star
    1,826
  • Rank 25,423 (Top 0.6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pion TURN, an API for building TURN clients and servers

Pion TURN
Pion TURN

A toolkit for building TURN clients and servers in Go

Pion TURN Slack Widget
GitHub Workflow Status Go Reference Coverage Status Go Report Card License: MIT


Pion TURN is a Go toolkit for building TURN servers and clients. We wrote it to solve problems we had when building RTC projects.

  • Deployable - Use modern tooling of the Go ecosystem. Stop generating config files.
  • Embeddable - Include pion/turn in your existing applications. No need to manage another service.
  • Extendable - TURN as an API so you can easily integrate with your existing monitoring and metrics.
  • Maintainable - pion/turn is simple and well documented. Designed for learning and easy debugging.
  • Portable - Quickly deploy to multiple architectures/platforms just by setting an environment variable.
  • Safe - Stability and safety is important for network services. Go provides everything we need.
  • Scalable - Create allocations and mutate state at runtime. Designed to make scaling easy.

Using

pion/turn is an API for building STUN/TURN clients and servers, not a binary you deploy then configure. It may require copying our examples and making minor modifications to fit your need, no knowledge of Go is required however. You may be able to download the pre-made binaries of our examples if you wish to get started quickly.

The advantage of this is that you don't need to deal with complicated config files, or custom APIs to modify the state of Pion TURN. After you instantiate an instance of a Pion TURN server or client you interact with it like any library. The quickest way to get started is to look at the examples or GoDoc

Examples

We try to cover most common use cases in examples. If more examples could be helpful please file an issue, we are always looking to expand and improve pion/turn to make it easier for developers.

To build any example you just need to run go build in the directory of the example you care about. It is also very easy to cross compile Go programs.

You can also see pion/turn usage in pion/ice

FAQ

Also take a look at the Pion WebRTC FAQ

Will pion/turn also act as a STUN server?

Yes.

How do I implement token-based authentication?

Replace the username with a token in the AuthHandler. The password sent by the client can be any non-empty string, as long as it matches that used by the GenerateAuthKey function.

Will WebRTC prioritize using STUN over TURN?

Yes.

RFCs

Implemented

Planned

Roadmap

The library is used as a part of our WebRTC implementation. Please refer to that roadmap to track our major milestones.

Community

Pion has an active community on the Slack.

Follow the Pion Twitter for project updates and important WebRTC news.

We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at [email protected]

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible: AUTHORS.txt

License

MIT License - see LICENSE for full text

More Repositories

1

webrtc

Pure Go implementation of the WebRTC API
Go
13,425
star
2

example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries
Go
1,031
star
3

awesome-pion

A curated list of awesome things related to Pion
Shell
723
star
4

stun

A Go implementation of STUN
Go
625
star
5

dtls

DTLS 1.2 Server/Client implementation for Go
Go
584
star
6

mediadevices

Go implementation of the MediaDevices API.
Go
530
star
7

ice

A Go implementation of ICE
Go
430
star
8

opus

Pure Go implementation of Opus
Go
389
star
9

rtp

A Go implementation of RTP
Go
349
star
10

rtwatch

Watch videos with friends using WebRTC, let the server do the pausing and seeking.
Go
301
star
11

sctp

A Go implementation of SCTP
Go
219
star
12

offline-browser-communication

Demonstration of a browser connecting to Pion WebRTC without a signaling server.
Go
195
star
13

mdns

Pure Go implementation of Multicast DNS
Go
190
star
14

quic

A Go implementation of the QUIC API for Peer-to-peer and Client-to-Server Connections
Go
178
star
15

rtsp-bench

RTSP -> WebRTC Server that generates a CPU Usage report
Go
165
star
16

rtcp

A Go implementation of RTCP
Go
151
star
17

sdp

A Go implementation of the SDP
Go
146
star
18

srtp

A Go implementation of SRTP
Go
116
star
19

interceptor

Pluggable RTP/RTCP processors for building real time communication
Go
109
star
20

obs-wormhole

Supercharge OBS with WebRTC. Remote WebRTC Sources and Serverless Broadcasting
Go
95
star
21

datachannel

A Go implementation of WebRTC Data Channels
Go
81
star
22

transport

Transport testing for Pion
Go
78
star
23

explainer

Explainer parses WebRTC Offers/Answers then provides summaries and suggestions
Go
45
star
24

11LiveChat

Another one-one live chatroom using pion webrtc with sfu mode
Go
42
star
25

udp

Please use github.com/pion/transport/v2/udp instead
Go
36
star
26

webrtc-voicemail

Voicemail.... for the web! Create voicemails via WebRTC and Transcribe them.
Go
31
star
27

demo-conference

A simple web conferencing application built using Pion
HTML
29
star
28

webrtc-zero-downtime-restart

A playground to make WebRTC easier to deploy, safer and more robust
Go
21
star
29

webrtc-v3-design

EXPERIMENTAL - new API proposals and discussions
Go
17
star
30

signaler

The Pion Signaler
Go
15
star
31

dcnet

net interfaces over DataChannels
Go
14
star
32

portmap

An implementation of UPnP-IGD, NAT-PMP and PCP for configuring port-forwarding
Go
13
star
33

.goassets

Asset files automatically deployed to Go package repositories
Shell
9
star
34

codec

Go wrappers of multiple codecs to be go gettable
Go
7
star
35

logging

The logging library used by Pion
Go
7
star
36

website

Pion public website
HTML
7
star
37

turnc

RFC 5766 TURN client implementation in go
Go
6
star
38

producer

File to webrtc.Track playback
Go
5
star
39

talks

Content for talks given by Pion WebRTC developers
CSS
5
star
40

pion-browser-client

Browser Client for Pion
JavaScript
5
star
41

msapi

media stream api for webrtc !
Go
4
star
42

randutil

Helper library for cryptographic and mathmatical randoms
Go
4
star
43

zapion

uber-go/zap âš¡ backended pion logger
Go
3
star
44

pkg

Shared Go libraries used by Pion products
Go
3
star
45

ci-sandbox

CI testing sandbox
Go
2
star
46

simulnet

A net implementation that enables simulations
2
star
47

ion-admin

This is ion's manager
1
star
48

.github

Default community health files
1
star
49

rtpio

Go
1
star