{"id":23832432,"url":"https://github.com/elenaf9/p2p-poc","last_synced_at":"2025-07-27T15:35:18.348Z","repository":{"id":56590777,"uuid":"295557010","full_name":"elenaf9/p2p-poc","owner":"elenaf9","description":"Basic PoC for the implementation of a Peer-to-Peer Network using the rust-libp2p library","archived":false,"fork":false,"pushed_at":"2023-05-31T09:21:09.000Z","size":42,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T14:36:13.968Z","etag":null,"topics":["hacktoberfest","libp2p","peer-to-peer"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elenaf9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-14T22:53:06.000Z","updated_at":"2023-05-31T09:21:13.000Z","dependencies_parsed_at":"2025-01-02T17:15:16.909Z","dependency_job_id":null,"html_url":"https://github.com/elenaf9/p2p-poc","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/elenaf9%2Fp2p-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elenaf9%2Fp2p-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elenaf9%2Fp2p-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elenaf9%2Fp2p-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elenaf9","download_url":"https://codeload.github.com/elenaf9/p2p-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233630486,"owners_count":18705438,"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":["hacktoberfest","libp2p","peer-to-peer"],"created_at":"2025-01-02T14:35:16.926Z","updated_at":"2025-01-12T16:32:18.957Z","avatar_url":"https://github.com/elenaf9.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p2p-poc\n\nBasic Mailbox that enables different peers to communicate with each other.\nIn order to provide a message / record for a remote peer, a local peer adds this information to a key-value-store mailbox that runs on a server. The mailbox publishes this record in their kademlia DHT, from which the remote peer can then read the value if they know the key.\n\n**This was only the PoC to start digging into the concepts and protocols of libp2p. Any further development and the library-version of this exists within [elenaf9/p2p](https://github.com/elenaf9/p2p)**.\n\n## Getting started\n\n` cargo run`\n\noptional arguments: \n- `--port \u003cport\u003e` to set a port that this peer listens to within the same network, default is 16384\n- `--mailbox \u003cmailbox-multiaddress\u003e \u003cmailbox-peerid\u003e` to connect to a mailbox, the arguments should be entered within string quotes.\n\n## command line interface\n\nAll values shoul be entered within typical string-quotes, apart from the timeout_sec, which is a numeric value without quotes.\n- `LIST`: list all the entries within the kademlia bucket of the peer\n- `PING \u003cping_id\u003e` Ping a remote peer in order to test the connection. This only works with peers that has been discovered and are listed in the kademlia bucket\n- `GET \u003ckey\u003e` Get the stored key-value pair for this key from either the own kademlia store or from the mailbox. Keys have to be alphanumeric.\n- `PUT \u003ckey\u003e \u003cvalue\u003e \u003ctimeout_sec:OPTIONAL\u003e` Add a record to the mailbox, key should be alphanumeric, values may contain any chars apart from '\"'. The optional timeout_sec should be a numeric value and it describes the duration that this record is available on the mailbox. If no timeout is given, it will be the default value of 90000sec/15min.\n\n## libp2p protocols\n\n- libp2p-noise for authentication\n- libp2p-kademlia DHT for peer discovery and publishing / reading records\n- libp2p-mdns for peer discovery within a local network\n- implementation of the libp2p-request-response protocol for custom Request/Response Messages\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felenaf9%2Fp2p-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felenaf9%2Fp2p-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felenaf9%2Fp2p-poc/lists"}