{"id":47914846,"url":"https://github.com/dhamith93/aero","last_synced_at":"2026-04-04T05:31:30.142Z","repository":{"id":62866282,"uuid":"548591679","full_name":"dhamith93/aero","owner":"dhamith93","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-21T04:41:02.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T17:29:17.366Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhamith93.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":"2022-10-09T21:52:08.000Z","updated_at":"2022-10-09T22:29:43.000Z","dependencies_parsed_at":"2022-11-08T06:33:15.100Z","dependency_job_id":null,"html_url":"https://github.com/dhamith93/aero","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dhamith93/aero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamith93%2Faero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamith93%2Faero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamith93%2Faero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamith93%2Faero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhamith93","download_url":"https://codeload.github.com/dhamith93/aero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamith93%2Faero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31389382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: 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":"2026-04-04T05:31:28.362Z","updated_at":"2026-04-04T05:31:30.124Z","avatar_url":"https://github.com/dhamith93.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aero\nGo module for file sharing between devices. Master device starts the server and node devices connect to the server. Once connected, each device can communicate with each other to get shared file list and directly download the shared files.\n## Usage\n\n### Master device\n```go\nimport (\n\t// ...\n    \"github.com/dhamith93/aero\"\n)\n\nfunc main() {\n    files := make([]aero.File, 0)\n    files = append(files, aero.NewFile(\"/path/to/file\"))\n    aero := aero.New(\n        aero.Device{\n            Name:       \"MASTER\",\n            Ip:         \"192.168.1.2\",\n            Port:       \"9000\",\n            SocketPort: \"9001\",\n            Files:      files,\n        },\n        true,\n    )\n\n    aero.SetKey(\"key-for-jwt-tokens\")\n\n    var wg sync.WaitGroup\n    wg.Add(2)\n    go aero.StartGrpcServer()\n    go aero.StartSocketServer()\n    wg.Wait()\n}\n```\n\n### Node device\n```go\nimport (\n\t// ...\n    \"github.com/dhamith93/aero\"\n)\n\nfunc main() {\n    files := make([]aero.File, 0)\n    files = append(files, aero.NewFile(\"/path/to/file\"))\n    aeroNew := aero.New(\n        aero.Device{\n            Name:       \"Node\",\n            Ip:         \"192.168.1.3\",\n            Port:       \"9000\",\n            SocketPort: \"9001\",\n            Files:      files,\n        },\n        true,\n    )\n\n    aeroNew.SetKey(\"key-for-jwt-tokens\")\n\n    // Register new device to server\n    devices, err := aeroNew.SendInit(*aeroNew.Self, aero.Device{Port: \"9000\", Ip: \"192.168.1.2\"})\n    if err != nil {\n        fmt.Println(err.Error())\n    }\n\n    // Get list of devices with files\n    devices, err = aeroNew.GetList()\n\n    // Get status of a device\n    status, err := aeroNew.GetStatus(devices[0])\n\n    // Check if file available\n    fileIdx := 0\n    err := aeroNew.FetchFile(devices[0], fileIdx)\n\n    // Download file and progress checking\n    downloadId := aeroNew.Download(devices[0], fileIdx)\n\n    for {\n        if aeroNew.SocketServer.Downloads[downloadId].Progress == 100 \u0026\u0026 aeroNew.SocketServer.Downloads[downloadId].HashMatched {\n            fmt.Println(\"file downloaded\")\n            break\n        }\n        if aeroNew.SocketServer.Downloads[downloadId].Error != nil {\n            fmt.Println(aeroNew.SocketServer.Downloads[downloadId].Error.Error())\n            break\n        }\n        fmt.Println(aeroNew.SocketServer.Downloads[downloadId].Progress)\t\t\n    }\n\n    // Get messages/logs \n    fmt.Println(aeroNew.SocketServer.Messages.Get())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhamith93%2Faero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhamith93%2Faero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhamith93%2Faero/lists"}