{"id":13608397,"url":"https://github.com/muka/peerjs-go","last_synced_at":"2026-03-16T05:32:44.286Z","repository":{"id":44748367,"uuid":"315554762","full_name":"muka/peerjs-go","owner":"muka","description":"Golang PeerJS  implementation","archived":false,"fork":false,"pushed_at":"2024-04-01T06:14:29.000Z","size":301,"stargazers_count":66,"open_issues_count":3,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-07T15:03:26.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/muka.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":"2020-11-24T07:41:06.000Z","updated_at":"2025-05-17T11:44:55.000Z","dependencies_parsed_at":"2024-06-18T22:43:49.765Z","dependency_job_id":"c6627cc2-1803-4213-a815-74662ae0540b","html_url":"https://github.com/muka/peerjs-go","commit_stats":{"total_commits":75,"total_committers":5,"mean_commits":15.0,"dds":0.5333333333333333,"last_synced_commit":"bd3c603f5871db86896508e647e03dea43b2a583"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muka/peerjs-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muka%2Fpeerjs-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muka%2Fpeerjs-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muka%2Fpeerjs-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muka%2Fpeerjs-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muka","download_url":"https://codeload.github.com/muka/peerjs-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muka%2Fpeerjs-go/sbom","scorecard":{"id":667674,"data":{"date":"2025-08-18","repo":{"name":"github.com/muka/peerjs-go","commit":"5b28944b9e4f7365c66ad8adb5357754593f5a69"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.8,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"58 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-jc84-3g44-wf2q","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr","Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T18:40:58.706Z","repository_id":44748367,"created_at":"2025-08-21T18:40:58.706Z","updated_at":"2025-08-21T18:40:58.706Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30567832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-16T04:42:47.996Z","status":"ssl_error","status_checked_at":"2026-03-16T04:42:44.668Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T19:01:26.950Z","updated_at":"2026-03-16T05:32:44.268Z","avatar_url":"https://github.com/muka.png","language":"Go","funding_links":[],"categories":["DataChannel","Go"],"sub_categories":[],"readme":"# Golang PeerJS\n\nA Golang port of [PeerJS](https://github.com/peers/peerjs)\n\n## Implementation\n\n- [x] Datachannel\n- [x] Mediachannel\n- [x] Test coverage \u003e 80%\n- [x] Signalling server\n- [ ] Interoperability tests\n\n## Docs\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/muka/peerjs-go.svg)](https://pkg.go.dev/github.com/muka/peerjs-go)\n\n⚠️ _Note_: While the Javascript [PeerJS documentation](https://peerjs.com/docs/) often applies to this library, there are differences, namely:\n\n- All methods and properties are in PascalCase.\n- Enum values are represented as seperate constants.\n- All peer event callback functions should take a generic interface{} parameter, and then cast the interface{} to the appropriate peerjs-go type.\n- Blocked peer event callback functions will block other peerjs-go events from firing.\n- Refer to the [go package docs](https://pkg.go.dev/github.com/muka/peerjs-go) whenever unsure.\n\n### Unsupported features\n\n- Payload de/encoding based on [js-binarypack](https://github.com/peers/js-binarypack) is not supported.\n- Message chunking (should be already done in recent browser versions)\n\n## Usage example\n\nSee [\\_examples folder](./_examples)\n\n```golang\n\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\tpeer \"github.com/muka/peerjs-go\"\n)\n\nfunc main() {\n\tpeer1, _ := peer.NewPeer(\"peer1\", peer.NewOptions())\n\tdefer peer1.Close()\n\n\tpeer2, _ := peer.NewPeer(\"peer2\", peer.NewOptions())\n\tdefer peer2.Close()\n\n\tpeer2.On(\"connection\", func(data interface{}) {\n\t\tconn2 := data.(*peer.DataConnection)\n\t\tconn2.On(\"data\", func(data interface{}) {\n\t\t\t// Will print 'hi!'\n\t\t\tlog.Printf(\"Received: %#v: %s\\n\", data, data)\n\t\t})\n\t})\n\n\tconn1, _ := peer1.Connect(\"peer2\", nil)\n\tconn1.On(\"open\", func(data interface{}) {\n\t\tfor {\n\t\t\tconn1.Send([]byte(\"hi!\"), false)\n\t\t\t\u003c-time.After(time.Millisecond * 1000)\n\t\t}\n\t})\n\n\tselect {}\n}\n```\n\n## Peer server\n\nThis library includes a GO based peer server in the [/server folder](./server/)\n\n### Documentation:\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/muka/peerjs-go/server.svg)](https://pkg.go.dev/github.com/muka/peerjs-go/server)\n\n### Example usage\n\n```golang\npackage main\n\nimport (\n\t\"log\"\n\n\tpeerjsServer \"github.com/muka/peerjs-go/server\"\n)\n\nfunc main() {\n\tserverOptions := peerjsServer.NewOptions()\n\t// These are the default values NewOptions() creates:\n\tserverOptions.Port = 9000\n\tserverOptions.Host = \"0.0.0.0\"\n\tserverOptions.LogLevel = \"info\"\n\tserverOptions.ExpireTimeout = 5000\n\tserverOptions.AliveTimeout = 60000\n\tserverOptions.Key = \"peerjs\"\n\tserverOptions.Path = \"/\"\n\tserverOptions.ConcurrentLimit = 5000\n\tserverOptions.AllowDiscovery = false\n\tserverOptions.CleanupOutMsgs = 1000\n\n\tserver := peerjsServer.New(serverOptions)\n\tdefer server.Stop()\n\n\tif err := server.Start(); err != nil {\n\t\tlog.Printf(\"Error starting peerjs server: %s\", err)\n\t}\n\n\tselect{}\n}\n```\n\n### Docker\n\nA docker image for the GO based peer server is available at [opny/peer-server](https://hub.docker.com/r/opny/peer-server) built for Raspberry Pi and PCs\n\n### Standalone\n\nTo build a standalone GO based Peerjs server executable, run `go build ./cmd/server/main.go` in the repository folder. To set the server options, create a `peer.yaml` configuration file in the same folder as the executable with the following options:\n\n**Available Server Options:**\n\n- **Host** String\n- **Port** Int\n- **LogLevel** String\n- **ExpireTimeout** Int64\n- **AliveTimeout** Int64\n- **Key** String\n- **Path** String\n- **ConcurrentLimit** Int\n- **AllowDiscovery** Bool\n- **CleanupOutMsgs** Int\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuka%2Fpeerjs-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuka%2Fpeerjs-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuka%2Fpeerjs-go/lists"}