{"id":15724169,"url":"https://github.com/skillfulelectro/emnetchain","last_synced_at":"2026-03-06T04:04:22.442Z","repository":{"id":247777890,"uuid":"826794223","full_name":"SkillfulElectro/EMNetChain","owner":"SkillfulElectro","description":"experimental Internet chaining application","archived":false,"fork":false,"pushed_at":"2024-07-12T18:58:42.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T04:49:11.622Z","etag":null,"topics":["json","peer-to-peer","protocol","tcp","tcp-client","tcp-server","tcp-socket","udp","udp-client","udp-server","udp-socket","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SkillfulElectro.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":"2024-07-10T11:46:10.000Z","updated_at":"2024-07-12T18:58:45.000Z","dependencies_parsed_at":"2024-10-24T17:54:08.933Z","dependency_job_id":"397aa922-0349-4eb1-ae4f-0a426b2c82db","html_url":"https://github.com/SkillfulElectro/EMNetChain","commit_stats":null,"previous_names":["skillfulelectro/emnetchain"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkillfulElectro%2FEMNetChain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkillfulElectro%2FEMNetChain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkillfulElectro%2FEMNetChain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkillfulElectro%2FEMNetChain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SkillfulElectro","download_url":"https://codeload.github.com/SkillfulElectro/EMNetChain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241113947,"owners_count":19911996,"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":["json","peer-to-peer","protocol","tcp","tcp-client","tcp-server","tcp-socket","udp","udp-client","udp-server","udp-socket","webrtc"],"created_at":"2024-10-03T22:15:11.033Z","updated_at":"2026-03-06T04:04:22.396Z","avatar_url":"https://github.com/SkillfulElectro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EMNetChain\n- EMNetChain is a robust toolchain, drawing inspiration from WebRTC. It's a cross-platform server that can be utilized to establish nodes across the internet.\n\n## Why?\n- EMNetChain provides a generalized and straightforward approach for creating nodes across the internet. This makes it an accessible and efficient tool for network configuration and management.\n- EMNetChain operates on simple JSON-structured texts.\n- EMNetChain is designed as an educational application and is structured using multiple crates. This modular approach enhances the readability of the source code. (EMNet , EMDisi_lib , EMUtil , simple_json_parser)\n- it can be used to create vpns , blockchains and etc\n\n## install\n```shell\ncargo install EMNetChain\n```\n\n## Getting started\n- you can start the app with cli flags -dis-addr and -chain-addr and both of them must be in ipv4:port format\n### example:\n```shell\nEMNetChain -dis-addr 127.0.0.1:8080 -chain-addr 127.0.0.1:8081\n```\n- if it does not start with cli args , it will ask you to provide them for it\n- it will start two servers , EMDisi and EMNetChain\n\n### EMNetChain Server\n- this server is used to create nodes and connect them to each other\n- each client creates two udp sockets , one as tail and other one as head\n- clients connect to it and send json messages to it in this format\n```json\n{\n    \"msg\":\"CONNECT\",\n    \"head\":\"127.0.0.1:1222\",\n    \"tail\": \"127.0.0.1:1224\"\n}\n```\nand then waits till server replies in this format\n```json\n{\"msg\":\"CONNECT\",\"part\":\"head\",\"ip\":\"127.0.0.1:1224\"}\n```\n**part specifies which udp socket must connect to that ipv4:port**\n\n### EMDisi Server\n- this server is used to repair the chain , if a client disconnects and etc\n- In the event of a disconnection, the client initiates a protocol to maintain the integrity of the network. This involves the client sending a notification to its connected peers, indicating its impending offline status, accompanied by a unique identifier. Following this, the two clients that received the notification communicate with the server in a predefined format :\n```json\n{\n    \"msg\":\"RECONNECT\",\n    \"id\":\"1234\",\n    \"ip\": \"127.0.0.1:1224\"\n}\n```\nip will be ipv4:port of udp socket which lost its friend\nand server will reply this way if new friend is available\n```json\n{\"msg\":\"CONNECT\",\"ip\":\"127.0.0.1:1223\"}\n```\n**you can write your own id gen server to make ids 100% unique**\n\n### EMUDP Server\n- to users get ipv4:port of their udp sockets , this server just echos the ipv4:port of connected clients https://github.com/SkillfulElectro/EMNet/tree/main/src/EMUDP\n\n\n## Conclusion\nEMNetChain, inspired by WebRTC, is a robust toolchain for creating and managing internet nodes. Its user-friendly design, based on JSON-structured texts and multiple crates, makes it ideal for educational purposes and versatile applications like VPNs and blockchains. Its unique protocol ensures network integrity, even during disconnections, making it a reliable solution for network management. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskillfulelectro%2Femnetchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskillfulelectro%2Femnetchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskillfulelectro%2Femnetchain/lists"}