Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ccding/go-stun
A go implementation of the STUN client (RFC 3489 and RFC 5389)
https://github.com/ccding/go-stun
go golang nat-traversal rfc-5389 stun webrtc
Last synced: about 1 month ago
JSON representation
A go implementation of the STUN client (RFC 3489 and RFC 5389)
- Host: GitHub
- URL: https://github.com/ccding/go-stun
- Owner: ccding
- License: apache-2.0
- Created: 2013-08-17T22:16:33.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T18:14:05.000Z (5 months ago)
- Last Synced: 2024-01-31T05:16:19.369Z (4 months ago)
- Topics: go, golang, nat-traversal, rfc-5389, stun, webrtc
- Language: Go
- Homepage:
- Size: 116 KB
- Stars: 618
- Watchers: 18
- Forks: 114
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go-extra - go-stun - 08-17T22:16:33Z|2022-04-19T04:23:30Z| (Networking / Uncategorized)
- awesome-go-zh - go-stun
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-stars - ccding/go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389) (Go)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - | - | - | (Networking / Strings)
- fucking-awesome-go - :octocat: go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389). :star: 80 :fork_and_knife: 21 (Networking / Advanced Console UIs)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Uncategorized)
- awesome-go-projects - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Uncategorized)
- awesome-go - go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go-with-framework - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Strings)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- zero-alloc-awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go-cn - go-stun - stun) (网络 / 音译)
- awesome-go-stars - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go-cn - go-stun
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Strings)
- awesome-go-cn - go-stun - stun) (网络 / 音译)
- awesome-go. - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go-zh - go-stun - stun) (网络 / 音译)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (<span id="网络-networking">网络 Networking</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-with-stars - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Uncategorized)
- repo-1316-awesome-go-cn - go-stun - stun) (网络 / 音译)
- repo-1211-awesome-go-cn - go-stun - stun) (网络 / 音译)
- awesome-Char - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Uncategorized)
- awesome-reader - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Strings)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Strings)
- Go-awesome - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go - go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go-handwritten - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-webrtc - go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389). (Stun & Turn)
- awesome-go2 - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Uncategorized)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). - :arrow_down:0 - :star:97 (Networking / Strings)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Advanced Console UIs)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Uncategorized)
- awesome-go-cn - go-stun
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- awesome-go - go-stun - Go implementation of the STUN client (RFC 3489 and RFC 5389). (Networking / Transliteration)
- go-awesome-cn-star - go-stun
- awesome-go-cn - go-stun
- awesome-go - go-stun - A go implementation of the STUN client (RFC 3489 and RFC 5389) - ★ 273 (Networking)
- awesome-stars - ccding/go-stun - `★649` A go implementation of the STUN client (RFC 3489 and RFC 5389) (Go)
README
go-stun
=======[![License](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://opensource.org/licenses/Apache-2.0)
[![GoDoc](https://godoc.org/github.com/ccding/go-stun?status.svg)](http://godoc.org/github.com/ccding/go-stun/stun)
[![Go Report Card](https://goreportcard.com/badge/github.com/ccding/go-stun)](https://goreportcard.com/report/github.com/ccding/go-stun)go-stun is a STUN (RFC 3489, 5389) client implementation in golang
(a.k.a. UDP hole punching).[RFC 3489](https://tools.ietf.org/html/rfc3489):
STUN - Simple Traversal of User Datagram Protocol (UDP)
Through Network Address Translators (NATs)[RFC 5389](https://tools.ietf.org/html/rfc5389):
Session Traversal Utilities for NAT (STUN)### Use the Command Line Tool
Simply run these commands (if you have installed golang and set `$GOPATH`)
```
go get github.com/ccding/go-stun
go-stun
```
or clone this repo and run these commands
```
go build
./go-stun
```
You will get the output like
```
NAT Type: Full cone NAT
External IP Family: 1
External IP: 166.111.4.100
External Port: 23009
```
You can use `-s` flag to use another STUN server, and use `-v` to work on
verbose mode.
```bash
> ./go-stun --help
Usage of ./go-stun:
-s string
server address (default "stun1.l.google.com:19302")
-v verbose mode
```### Use the Library
The library `github.com/ccding/go-stun/stun` is extremely easy to use -- just
one line of code.```go
import "github.com/ccding/go-stun/stun"func main() {
nat, host, err := stun.NewClient().Discover()
}
```More details please go to `main.go` and [GoDoc](http://godoc.org/github.com/ccding/go-stun/stun)