{"id":13413604,"url":"https://github.com/ccding/go-stun","last_synced_at":"2025-05-14T11:08:51.033Z","repository":{"id":10118324,"uuid":"12186599","full_name":"ccding/go-stun","owner":"ccding","description":"A go implementation of the STUN client (RFC 3489 and RFC 5389)","archived":false,"fork":false,"pushed_at":"2024-07-01T17:54:45.000Z","size":119,"stargazers_count":700,"open_issues_count":4,"forks_count":124,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-09T03:09:48.739Z","etag":null,"topics":["go","golang","nat-traversal","rfc-5389","stun","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-17T22:16:33.000Z","updated_at":"2025-04-06T09:42:20.000Z","dependencies_parsed_at":"2024-06-18T12:15:43.983Z","dependency_job_id":"7fc0df32-a94e-40d1-a245-df992ddadf19","html_url":"https://github.com/ccding/go-stun","commit_stats":{"total_commits":122,"total_committers":13,"mean_commits":9.384615384615385,"dds":0.2786885245901639,"last_synced_commit":"d32c135f5e509d278e95ba9945849903f966a91f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccding%2Fgo-stun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccding%2Fgo-stun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccding%2Fgo-stun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccding%2Fgo-stun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccding","download_url":"https://codeload.github.com/ccding/go-stun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254129481,"owners_count":22019628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","nat-traversal","rfc-5389","stun","webrtc"],"created_at":"2024-07-30T20:01:44.285Z","updated_at":"2025-05-14T11:08:51.005Z","avatar_url":"https://github.com/ccding.png","language":"Go","readme":"go-stun\n=======\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GoDoc](https://godoc.org/github.com/ccding/go-stun?status.svg)](http://godoc.org/github.com/ccding/go-stun/stun)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ccding/go-stun)](https://goreportcard.com/report/github.com/ccding/go-stun)\n\ngo-stun is a STUN (RFC 3489, 5389) client implementation in golang\n(a.k.a. UDP hole punching).\n\n[RFC 3489](https://tools.ietf.org/html/rfc3489):\nSTUN - Simple Traversal of User Datagram Protocol (UDP)\nThrough Network Address Translators (NATs)\n\n[RFC 5389](https://tools.ietf.org/html/rfc5389):\nSession Traversal Utilities for NAT (STUN)\n\n### Use the Command Line Tool\n\nSimply run these commands (if you have installed golang and set `$GOPATH`)\n```\ngo get github.com/ccding/go-stun\ngo-stun\n```\nor clone this repo and run these commands\n```\ngo build\n./go-stun\n```\nYou will get the output like\n```\nNAT Type: Full cone NAT\nExternal IP Family: 1\nExternal IP: 166.111.4.100\nExternal Port: 23009\n```\nYou can use `-s` flag to use another STUN server, and use `-v` to work on\nverbose mode.\n```bash\n\u003e ./go-stun --help\nUsage of ./go-stun:\n  -s string\n        server address (default \"stun1.l.google.com:19302\")\n  -v    verbose mode\n```\n\n### Use the Library\n\nThe library `github.com/ccding/go-stun/stun` is extremely easy to use -- just\none line of code.\n\n```go\nimport \"github.com/ccding/go-stun/stun\"\n\nfunc main() {\n\tnat, host, err := stun.NewClient().Discover()\n}\n```\n\nMore details please go to `main.go` and [GoDoc](http://godoc.org/github.com/ccding/go-stun/stun)\n","funding_links":[],"categories":["网络相关库","Go","Stun \u0026 Turn","Networking","网络","Relational Databases","\u003cspan id=\"网络-networking\"\u003e网络 Networking\u003c/span\u003e"],"sub_categories":["暂未分类","C/C++","Advanced Console UIs","Uncategorized","Strings","Transliteration","音译","暂未分类这些库被放在这里是因为其他类别似乎都不适合。","交流","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccding%2Fgo-stun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccding%2Fgo-stun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccding%2Fgo-stun/lists"}