HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
keroserene
go-webrtc
Go2016–2016
keroserene / go-webrtc

go-webrtc

WebRTC for Go

2Distinct people
2Mentions
0Explicit recommenders
455GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

WebRTC for Go

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2016-12-27 22:55:19 UTC to 2016-12-27 23:29:45 UTC.

012016-12-27 22:00:00 UTC to 2016-12-27 23:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 27, 22:002016-12-27 23:00:00 UTC to 2016-12-28 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 27, 23:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Dec 27, 22:002016-12-27 22:00:00 UTC2016-12-27 23:00:00 UTC101
Dec 27, 23:002016-12-27 23:00:00 UTC2016-12-28 00:00:00 UTC101

What Hacker News says

2 sources
There was a discussion about this on go-nuts: http://grokbase.com/t/gg/golang-nuts/161wbn1vf0/go-nuts-nati... There are two bindings for Go built on top of the WebRTC code at webrtc.org: https://github.com/keroserene/go-webrtc https://github.com/fd/webrtc By the way, I work on the WebRTC team at Google, and I don't think it would be that hard to write a data channel server in Go. Here's how you should do it. 1. Get an "SDP offer" from the client. Parse it mainly to get the DTLS fingerprint. You may also choose to get the SCTP max message size. 2. Open a UDP socket. Listen for incoming STUN binding requests and send back binding responses: You can see how the WebRTC client code constructs requests here: https://cs.chromium.org/chromium/src/third_party/webrtc/p2p/... You can see how the WebRTC client code processes responses here: htt
Read the rest
ps://cs.chromium.org/chromium/src/third_party/webrtc/p2p/... Or you can read the RFC (warning: not light reading): https://tools.ietf.org/html/rfc5245 3. Once a valid STUN binding request is received, listen for DTLS packets and hand those over to BoringSSL. Also listen to when BoringSSL wants to send a packet and send those out on the UDP socket back to the client. You can see how the WebRTC client code passes DTLS packets down to BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base... You can see how the WebRTC client code gets packets to send from BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base... 4. Once BoringSSL finishes the DTLS handshake and is processing incoming SCTP packets, listen for those and hand those over to usrsctplib. Also listen to packets usrsctplib wants to send and hand those over to DTLS to send. You can see how the WebRTC client code reads decrypted packets from BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base... And how it passes them down to usrsctplib here: https://cs.chromium.org/chromium/src/third_party/webrtc/medi... You can see how the WebRTC client code gets packets to send from usrsctplib here: https://cs.chromium.org/chromium/src/third_party/webrtc/medi... And how it passes them to BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base... 5. Process data channel messages from usrsctplib and send data channel message through usrsctplib. Note that you can ignore the whole "OPEN message" protocol if you call PeerConnection.createDataChannel with the "negotiated: true" option on the WebRTC client side. You can specify the SID you want to use for the data channel as well. You can see how the WebRTC client code passes messages to usrsctplib here: https://cs.chromium.org/chromium/src/third_party/webrtc/medi... And how it receives them: https://cs.chromium.org/chromium/src/third_party/webrtc/medi... https://cs.chromium.org/chromium/src/third_party/webrtc/medi... 6. Serialize an "SDP answer" message which basically just hands back the same looking blob of text, but with a different DTLS fingerprint (the one for the certificate of the server). It also must have two random strings: the ICE username fragment (ufrag) and ICE password (pwd). If you pass that answer to the WebRTC client, all the ICE, DTLS, and SCTP work should happen and after around 6 round trips on the network, you should incoming and outgoing messages. Ok, that probably sounds like a lot, but most of the work is done by BoringSSL and usrsctplib. The bulk of the Go code would be implementing the STUN messages and gluing everything together. Good luck to whoever tries :).
In WebRTC: the future of web games

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.