A commandline tool for searching and downloading files in LAN network, without any central server.
Why I built this ?
pip install iwant
Or, if you download from source
python setup.py install --user
Works on Python2 only
Make sure, you have the following system dependencies installed:
iWant. A commandline tool for searching and downloading files in LAN network, without any central server. Usage: iwanto start iwanto search <name> iwanto download <hash> iwanto share <path> iwanto download to <destination> iwanto view config iwanto --version Options: -h --help Show this screen. --version Show version. start This starts the iwant server in your system search <name> Discovering files in the network. Example: iwanto search batman download <hash> Downloads the file from the network share <path> Change your shared folder view config View shared and download folder download to <destination> Change download folder
Note: Shared and Download folder cannot be the same
How to run
iwanto start (this runs the iwant service).
To run services like, search, download, view config and change config, open up another terminal and make sure that iwant server is running.
In windows, admin access is required to run the server
Type the name of file ;) (P.S No need of accurate names)
iwanto search <filename>
iwanto search "slicon valey"
To download the file , just enter the hash of the file you get after searching.
iwanto download <hash of the file>
iwanto download b8f67e90097c7501cc0a9f1bb59e6443
Change shared folder
Change shared folder anytime (Even when iwant service is running)
iwanto share <path>
iwanto share /home/User/Movies/
In windows, give quotes:
iwanto share "C:\Users\xyz\books\"
Change downloads folder
Change download folder anytime
iwanto download to <path>
iwanto download to /home/User/Downloads
In windows, give quotes:
iwanto download to "C:\User\Downloads"
View shared/donwload folder
iwanto view config
How does it work ?
As soon as the program starts, it spawns the election daemon , folder monitoring daemon and server daemon .
The election daemon takes care of the following activities
When the folder monitoring daemon starts, it performs the following steps
Indexes all the files in the shared folder
The iwant client talks to the server daemon when the user wishes to:
search for files
The server daemon receives commands from iwant client and updates from file monitoring and election daemon .
Updates received from folder monitoring daemon is fowarded to the leader. For example: indexed files/folders information.
leader changeevent, triggers the server to forward the indexed files/folders information to the new leader
file searchis 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)
file downloadis 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.
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.
Why it may not work?