{"id":19628188,"url":"https://github.com/gr455/directtransfer","last_synced_at":"2025-07-03T13:06:41.581Z","repository":{"id":99109283,"uuid":"427750858","full_name":"gr455/DirectTransfer","owner":"gr455","description":"Send and recv files parallely","archived":false,"fork":false,"pushed_at":"2022-01-08T07:13:49.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T13:01:12.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/gr455.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":"2021-11-13T19:08:44.000Z","updated_at":"2022-11-10T08:58:05.000Z","dependencies_parsed_at":"2023-06-03T22:00:15.837Z","dependency_job_id":null,"html_url":"https://github.com/gr455/DirectTransfer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gr455/DirectTransfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr455%2FDirectTransfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr455%2FDirectTransfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr455%2FDirectTransfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr455%2FDirectTransfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr455","download_url":"https://codeload.github.com/gr455/DirectTransfer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr455%2FDirectTransfer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263331775,"owners_count":23450155,"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":[],"created_at":"2024-11-11T11:54:25.174Z","updated_at":"2025-07-03T13:06:41.550Z","avatar_url":"https://github.com/gr455.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DirectTransfer\nSend and recv files with people around you with ease and speed\n\nDirectTransfer provides an easy way to share files with people around you or on the current network. It uses TCP over sockets to transfer files and folders, completely peer to peer. DirectTransfer allows the user to send or receive multiple files / folders with or from multiple devices at the same time, parallely.\n\n## Flow\n\n![Topology Diagram](https://user-images.githubusercontent.com/53974118/141687531-1e5d29ab-4cb3-466a-8156-43ce7544829d.png)\n\n1. UI initiates a send (from the Host machine)\n2. Host machine talks to the HTTP server of the Client machine, asking for an open TCP port\n3. Client UI tells the Client HTTP server to open the TCP port\n4. Client HTTP server queries to open a TCP port\n5. Client HTTP server retrieves the opened port number\n6. Client HTTP server sends the port number to Host HTTP server\n7. Host HTTP server queries to send the file to the retrieved port\n8. Host sends the file to the Client through the now established TCP connection\n\nAs a user, there are two ways I can send files:\n\nA send is initiated by me to a client, the client accepts the file\nI expose an index of files that client can request from me, the client requests a file and I send it to them.\n\n**It consists of two parts**:\n\n**Daemon**: A simple HTTP server. All core network function calls are initiated by this server.\n\n**UI**: talks to the daemon server for any actions.\n\n## Usage\n\nTo setup the development environment, first install all the dependencies\n\n```\npip install -r requirements.txt\n```\n\nThen manually start the server\n\n### Server (Development)\n```\npython daemon/server.py\n```\n\nThen use the CLI to interact with the server\n\n### CLI\n\nDirectTransfer provides a simple Command Line Interface to send files\n\n```\npython ui/cli/cli.py\n\nUsage: cli.py [OPTIONS] ACTION\n\nActions:\n  send: Send files to a client\n  receive: Listen for files and reveive them\n  \nOptions:\n  -c TEXT  (send only) Client IP\n  -p TEXT  File or directory path\n  --help   Show this message and exit.\n\n```\n\n## Code\n\n* `daemon/` contains all the code related to the daemon\n  * `daemon/server.py` contains the code for the HTTP server written in Flask\n  * `daemon/net/` contains all the TCP network code\n    * `daemon/net/asclient.py` contains code for peer acting as a client (recieving files)\n    * `daemon/net/ashost.py` contains code for peer acting as a host (sending files)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr455%2Fdirecttransfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr455%2Fdirecttransfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr455%2Fdirecttransfer/lists"}