{"id":13632207,"url":"https://github.com/nirvik/iWant","last_synced_at":"2025-04-18T02:32:06.091Z","repository":{"id":54059820,"uuid":"67346349","full_name":"nirvik/iWant","owner":"nirvik","description":"Commandline tool for searching and downloading files in LAN network, without any central server","archived":false,"fork":false,"pushed_at":"2020-03-23T00:42:49.000Z","size":9133,"stargazers_count":291,"open_issues_count":5,"forks_count":26,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-04-25T21:04:41.146Z","etag":null,"topics":["commandline","consensus-algorithm","decentralization","file-monitoring","file-sharing","lan","p2p","peer-to-peer","python","twisted"],"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/nirvik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-04T13:30:13.000Z","updated_at":"2024-03-26T13:10:54.000Z","dependencies_parsed_at":"2022-08-13T06:20:48.395Z","dependency_job_id":null,"html_url":"https://github.com/nirvik/iWant","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/nirvik%2FiWant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvik%2FiWant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvik%2FiWant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvik%2FiWant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirvik","download_url":"https://codeload.github.com/nirvik/iWant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249414252,"owners_count":21267724,"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":["commandline","consensus-algorithm","decentralization","file-monitoring","file-sharing","lan","p2p","peer-to-peer","python","twisted"],"created_at":"2024-08-01T22:02:56.249Z","updated_at":"2025-04-18T02:32:05.163Z","avatar_url":"https://github.com/nirvik.png","language":"Python","funding_links":[],"categories":["Python","Networking"],"sub_categories":["BitTorrent"],"readme":"# iWant\n### CLI based decentralized peer to peer file sharing\n\n### Build Status\n[![Build Status](https://travis-ci.org/nirvik/iWant.svg?branch=master)](https://travis-ci.org/nirvik/iWant)\n\n## What is it?  \nA commandline tool for searching and downloading files in LAN network, without any central server. \n\n## Features\n* __Decentralized__ : There is no central server hosting files. Therefore, no central point of failure \n* __Easy discovery of files__: As easy as searching for something in Google. \n* __File download from multiple peers__: If the seeder fails/leaves the group, leecher will continue to download from another seeder in the network \n* __Directory download__: Supports downloading directories   \n* __Resume download__:  Resume download from where you left off. \n* __Consistent data__: Any changes(modification, deletion, addition) made to files inside the shared folder will be instantly reflected in the network \n* __Cross Platform__: Works in Linux/Windows/Mac. More testing needs to be done in Mac \n\n## Why I built this ? \n\n* I like the idea of typing some filename in the terminal and download it if people around me have it.\n* No third party registration. \n* No crazy configuration. \n* Wanted it to be cross platform. \n* Zero downtime. \n* No browser.. just terminal\n* For fun ¯\\\\_(ツ)_/¯\n\n## Installation  \n```sh\npip install iwant\n```\n\nOr, if you download from source\n```sh\npython setup.py install --user\n```\n\n\n## System Dependencies \nMake sure, you have the following system dependencies installed:\n* libffi-dev \n* libssl-dev\n\n## Usage\n```\niWant.\n\n    A commandline tool for searching and downloading files in LAN network, without any central server.\n\n\nUsage:\n    iwanto start\n    iwanto search \u003cname\u003e\n    iwanto download \u003chash\u003e\n    iwanto share \u003cpath\u003e\n    iwanto download to \u003cdestination\u003e\n    iwanto view config\n    iwanto --version\n\nOptions:\n    -h --help                           Show this screen.\n    --version                           Show version.\n    start                               This starts the iwant server in your system\n    search \u003cname\u003e                       Discovering files in the network. Example: iwanto search batman\n    download \u003chash\u003e                     Downloads the file from the network\n    share \u003cpath\u003e                        Change your shared folder\n    view config                         View shared and download folder\n    download to \u003cdestination\u003e           Change download folder\n\n```\n\n__Note: Shared and Download folder cannot be the same__\n\n## How to run \nRun `iwanto start` (this runs the iwant service).   \n\n## Running client\nTo run services like, search, download, view config and change config, open up another terminal and make sure that iwant server is running.\n\n## Running server   \nIn windows, admin access is required to run the server\n```sh\niwanto start\n```\n![alt text](docs/starting.gif)\n\n## Search files    \nType the name of file ;)  (P.S No need of accurate names)\n```sh\niwanto search \u003cfilename\u003e\n```\nExample: \n```sh\niwanto search \"slicon valey\"\n```\n![alt text](docs/searching.gif)\n\n## Download files  \nTo download the file , just enter the hash of the file you get after searching. \n```sh\niwanto download \u003chash of the file\u003e\n```\nExample: \n```sh\niwanto download b8f67e90097c7501cc0a9f1bb59e6443\n```\n![alt text](docs/downloading.gif)\n\n## Change shared folder  \nChange shared folder anytime (Even when iwant service is running)  \n```sh\niwanto share \u003cpath\u003e\n```\nExample: \n```sh\niwanto share /home/User/Movies/\n```\nIn windows, give quotes:\n```sh\niwanto share \"C:\\Users\\xyz\\books\\\"\n```\n![alt text](docs/shareNewFolder.gif)\n\n## Change downloads folder  \nChange download folder anytime \n```sh\niwanto download to \u003cpath\u003e\n```\nExample: \n```sh\niwanto download to /home/User/Downloads\n```\nIn windows, give quotes:\n```sh\niwanto download to \"C:\\User\\Downloads\"\n```\n\n## View shared/donwload folder  \n```sh\niwanto view config\n```\n\n## How does it work ? \n\nAs soon as the program starts, it spawns the __election daemon__, __folder monitoring daemon__ and __server daemon__.  \n\n\n1. The __election daemon__ takes care of the following activities  \n    * Manages the consensus. \n    * Notifies the __server daemon__ as soon as there is a leader change. \n    * It coordinates with other peers in the network regarding contesting elections, leader unavailability, network failure, split brain situation etc. \n    * It uses __multicast__ for peer discovery. The consensus description is mentioned [here](iwant/core/engine/consensus/README.md) \n\n2. When the __folder monitoring daemon__ starts, it performs the following steps \n    * Indexes all the files in the shared folder \n    * Updates the entries in the database \n    * Informs the server about the indexed files and folders.\n    * Any changes made in the shared folder will trigger the __folder monitoring daemon__ to index the modified files, update the database and then inform the server about the changes \n3. The __iwant client__ talks to the __server daemon__ when the user wishes to:  \n    * search for files \n    * download files  \n    * change shared folder  \n    * change download folder  \n4. The __server daemon__ receives commands from __iwant client__ and updates from __file monitoring and election daemon__. \n    * Updates received from __folder monitoring daemon__ is fowarded to the leader. For example: indexed files/folders information. \n    * Updates received from the __election daemon__ like `leader change` event, triggers the server to forward the indexed files/folders information to the new leader\n    * Queries received from the __iwant client__ like `file search` is forwarded to the leader, who then performs fuzzy search on the metadata it received from other peers and returns a list containing (filename, size, checksum)\n    * Queries received from the __iwant client__ like `file download` is forwarded to the leader, who forwards the roothash of the file/folder along with the list of peers who have the file. The __server daemon__ then intiates download process with peers mentioned in the peers list.\n    * Updates received from the __iwant client__ like `changing shared folder`, triggers the __server daemon__ to make sure that the __folder monitoring daemon__ indexes the new folder and after indexing is complete, the __server daemon__ updates the leader with the new indexed files/folders meta information.\n\n## Todo\n* Incorporate tight security mechanisms  \n* Add Python3 support  \n* Add video preview  \n* Add streaming functionality  \n* Add basic NAT traversal  \n* Create test modules  \n* Improve UI for file/folder download progress bar  \n\n## Why it may not work? \n* Firewall \n* Multicast not supported in your router.\n\n\n## Errors\nAll logs are present in `~/.iwant/.iwant.log` or `AppData\\Roaming\\.iwant\\.iwant.log`\n\n\n## Liked the project ? \n[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/nirvik)  \nAny ideas, bugs or modifications required, feel free to me send me a PR :) \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvik%2FiWant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirvik%2FiWant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvik%2FiWant/lists"}