{"id":37182618,"url":"https://github.com/symphonyprotocol/p2p","last_synced_at":"2026-01-14T21:03:56.111Z","repository":{"id":57537840,"uuid":"143299810","full_name":"symphonyprotocol/p2p","owner":"symphonyprotocol","description":"Decentralized P2P networking framework","archived":false,"fork":false,"pushed_at":"2019-10-31T08:28:14.000Z","size":101,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-20T03:44:45.651Z","etag":null,"topics":["cryptography","golang","network","p2p"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/symphonyprotocol.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}},"created_at":"2018-08-02T13:39:21.000Z","updated_at":"2024-06-20T03:44:45.652Z","dependencies_parsed_at":"2022-09-07T17:24:17.559Z","dependency_job_id":null,"html_url":"https://github.com/symphonyprotocol/p2p","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/symphonyprotocol/p2p","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonyprotocol%2Fp2p","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonyprotocol%2Fp2p/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonyprotocol%2Fp2p/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonyprotocol%2Fp2p/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symphonyprotocol","download_url":"https://codeload.github.com/symphonyprotocol/p2p/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonyprotocol%2Fp2p/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"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":["cryptography","golang","network","p2p"],"created_at":"2026-01-14T21:03:55.306Z","updated_at":"2026-01-14T21:03:56.103Z","avatar_url":"https://github.com/symphonyprotocol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P2P\nDecentralized P2P networking framework\n\n## How to run example\n### 1. Create a configuration file `~/.symchaincfg` in json format with the static nodes:\n```json\n{\n    \"nodes\":\n    [\n        {\n            \"id\": \"c4ef0694fee0cdf78eab30c83b325293047e0b27511b92e8e206b199b24f13ea\",\n            \"ip\":\"101.200.156.243\",\n            \"port\": 32768\n        }\n    ]\n}\n```\n\n\u003e You can find the `id` in the console log when launching your application for now...\n\n### 2. Start go file `examples/main.go` and it will connect to the static node and discover other nodes.\n\n## How to use it in your application\n```go\nimport (\n    \"github.com/symphonyprotocol/p2p\"\n    \"github.com/symphonyprotocol/p2p/tcp\"\n    \"fmt\"\n)\n\ntype SampleMiddleware struct {}\n\nfunc (s *SimpleMiddleware) Handle(ctx *tcp.P2PContext) {\n    fmt.Println(\"Handling message\")\n}\nfunc (s *SimpleMiddleware) Start(ctx *tcp.P2PContext) {\n    fmt.Println(\"Middleware started\")\n}\nfunc (s *SimpleMiddleware) AcceptConnection(conn *tcp.TCPConnection) {\n    fmt.Println(\"New connection got\")\n}\nfunc (s *SimpleMiddleware) DropConnection(conn *tcp.TCPConnection) {\n    fmt.Println(\"Connection dropped\")\n}\n\nfunc (s *SimpleMiddleware) Name() string { return \"Sample Middleware\" }\nfunc (s *SimpleMiddleware) DashboardData() interface{} { return [][]string{ } } \nfunc (s *SimpleMiddleware) DashboardType() string { return \"table\" }\nfunc (s *SimpleMiddleware) DashboardTitle() string { return \"Sample\" }\nfunc (s *SimpleMiddleware) DashboardTableHasColumnTitles() bool { return false }\n\nfunc main() {\n    server := p2p.NewP2PServer()\n    server.Use(\u0026SimpleMiddleware{})\n}\n```\n## Module Support\n\n* In progress","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymphonyprotocol%2Fp2p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymphonyprotocol%2Fp2p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymphonyprotocol%2Fp2p/lists"}