{"id":15451813,"url":"https://github.com/willscott/goturn","last_synced_at":"2025-04-30T16:42:07.450Z","repository":{"id":140831838,"uuid":"52182881","full_name":"willscott/goturn","owner":"willscott","description":"A golang TURN dialer","archived":false,"fork":false,"pushed_at":"2017-08-02T22:05:38.000Z","size":92,"stargazers_count":38,"open_issues_count":4,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-13T08:40:12.776Z","etag":null,"topics":["golang","stun","turn","webrtc"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willscott.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":"2016-02-21T00:21:58.000Z","updated_at":"2024-06-22T20:19:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"94fb4fca-0069-488b-9d23-d565aff4d562","html_url":"https://github.com/willscott/goturn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willscott%2Fgoturn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willscott%2Fgoturn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willscott%2Fgoturn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willscott%2Fgoturn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willscott","download_url":"https://codeload.github.com/willscott/goturn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231297126,"owners_count":18354602,"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":["golang","stun","turn","webrtc"],"created_at":"2024-10-01T21:39:50.654Z","updated_at":"2024-12-26T01:08:57.472Z","avatar_url":"https://github.com/willscott.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go TURN\n=======\n[![GoDoc](https://godoc.org/github.com/willscott/goturn?status.svg)](https://godoc.org/github.com/willscott/goturn)\n\nThis is a library providing a Go interface compatible with the golang\n[proxy](https://golang.org/x/net/proxy) package which connects through a\n[TURN](https://tools.ietf.org/html/rfc5766) relay.\n\nThis package provides parsing and encoding support for [STUN](https://tools.ietf.org/html/rfc5389)\nand [TURN](https://tools.ietf.org/html/rfc5766) protocols.\n\nInstallation\n------------\n\n```golang\ngo get github.com/willscott/goturn\n```\n\nFull Example\n------------\n\n```golang\npackage main\n\nimport (\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\n\t\"github.com/willscott/goturn/client\"\n)\n\nfunc main() {\n\t// Connect to the stun/turn server\n\tconn, err := net.Dial(\"tcp\", \"127.0.0.1:19302\")\n\tif err != nil {\n\t\tlog.Fatal(\"error dialing TURN server: \", err)\n\t}\n\tdefer conn.Close()\n\n\tcredentials := client.LongtermCredentials(\"username\", \"password\")\n\tdialer, err := client.NewDialer(\u0026credentials, conn)\n\tif err != nil {\n\t\tlog.Fatal(\"failed to obtain dialer: \", err)\n\t}\n\n\thttpClient := \u0026http.Client{Transport: \u0026http.Transport{Dial: dialer.Dial}}\n\thttpResp, err := httpClient.Get(\"http://www.google.com/\")\n\tif err != nil {\n\t\tlog.Fatal(\"error performing http request: \", err)\n\t}\n\tdefer httpResp.Body.Close()\n\n\thttpBody, err := ioutil.ReadAll(httpResp.Body)\n\tif err != nil {\n\t\tlog.Fatal(\"error reading http response: \", err)\n\t}\n\tlog.Printf(\"received %d bytes\", len(httpBody))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillscott%2Fgoturn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillscott%2Fgoturn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillscott%2Fgoturn/lists"}