pixelbender / go-stun Goto Github PK
View Code? Open in Web Editor NEWGo implementation of STUN, TURN and ICE Protocols
License: MIT License
Go implementation of STUN, TURN and ICE Protocols
License: MIT License
The second example does not work (README.md - TURN: Relayed transport address allocation), because the package "github.com/pixelbender/go-stun/turn" is missing. It was removed on 14 Feb 2017 with the ice package. Is there another way and the README is outdated or is it not supported anymore?
Thank you very much.
I'm struggling to use this effectively and am wondering if you could provide some examples.
The actually communication with the STUN server works fine: it returns the public addr observed by the STUN server.
But USING this information isn't working for me, and it has me wondering if I'm just misunderstanding how the package works (thus the request for examples).
For example, when calling stun.Discover
it returns a conn and addr. I'm attempting, after performing the discover, to receive UDP packets sent to addr. So I'm trying to read from the return conn (while sending UDP messages to addr
from another machine), but nothing ever comes through.
The purpose of STUN in my understanding is to hole-punch so peers can send UDP traffic to the public addr
, which is then forwarded to the correct host. Can I see an example of how this package gets that done?
How difficult would you consider adding this feature to be?
Local candidate gathering is based on local interfaces and tunnels according to the rfc. I'm not sure how tunnel discovery would work. As for other possible candidates, this is where STUN and TURN come in correct? So this really only requires writing a method that gathers candidates using the STUN server you have already created? In the simple form; expanding to TURN later.
I'm trying to navigate a STUN binding request/response with Chrome. In my setup, the "offerer" is a Go application that uses go-stun and the "answerer" is a simple javascript application utilizing the chrome webrtc API. After sending an SDP offer, Chrome sends a STUN binding request to my Go application, and I attempt to send back a STUN binding success response using go-stun. However, my response does not seem to be accepted by Chrome.
Do you have an example of successfully negotiating a STUN connection with Chrome?
For reference, I am not attempting to communicate with a STUN server, and I am not doing true "hole punching" since both peers are running locally.
I see in codes below that import a TURN package.But I can't find it?
import (
"github.com/pixelbender/go-stun/turn"
"fmt"
)
Maheshs-MacBook-Air:test maheshjena$ go run test_turn.go
stun: unknown attributes []uint16{0x10}
Can you please let me know, which attribute is giving this error?
Please add an new api in server.go
The code like below:
func (srv *Server) Serve(c net.PacketConn) error {
srv.addConn(c)
defer srv.removeConn(c)
return srv.agent.ServePacket(c)
}
I want to add another net.PacketConn implement not using net.ListenPacket, and I cann't find any api to support.
Thanks for you great project!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.