Package: iwant
What is it?A commandline tool for searching and downloading files in LAN network,
without any central server.FeaturesDecentralized: There is no central server hosting files.
Therefore, no central point of failureEasy discovery of files: As easy as searching for something in
Google.File download from multiple peers: If the seeder fails/leaves the
group, leecher will continue to download from another seeder in the
networkDirectory download: Supports downloading directoriesResume download: Resume download from where you left off.Consistent data: Any changes(modification, deletion, addition)
made to files inside the shared folder will be instantly reflected in
the networkCross Platform: Works in Linux/Windows/Mac. More testing needs to
be done in MacWhy I built this ?I like the idea of typing some filename in the terminal and download
it if people around me have it.No third party registration.No crazy configuration.Wanted it to be cross platform.Zero downtime.No browser.. just terminalFor fun ¯\(ツ)/¯Installationpythonsetup.pyinstall--userSystem DependenciesMake sure, you have the following system dependencies installed: *
libffi-dev * libssl-devUsageiWant.

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 folderNote: Shared and Download folder cannot be the sameHow to runRuniwanto start(this runs the iwant service).Running clientTo run services like, search, download, view config and change config,
open up another terminal and make sure that iwant server is running.Running serverIn windows, admin access is required to run the serveriwantostartSearch filesType the name of file ;) (P.S No need of accurate names)iwantosearch<filename>Example:iwantosearch"slicon valey"Download filesTo download the file , just enter the hash of the file you get after
searching.iwantodownload<hashofthefile>Example:iwantodownloadb8f67e90097c7501cc0a9f1bb59e6443Change shared folderChange shared folder anytime (Even when iwant service is running)iwantoshare<path>Example:iwantoshare/home/User/Movies/In windows, give quotes:iwantoshare"C:\Users\xyz\books\"Change downloads folderChange download folder anytimeiwantodownloadto<path>Example:iwantodownloadto/home/User/DownloadsIn windows, give quotes:iwantodownloadto"C:\User\Downloads"View shared/donwload folderiwantoviewconfigHow does it work ?As soon as the program starts, it spawns theelection daemon,folder monitoring daemonandserver daemon.Theelection daemontakes care of the following activitiesManages the consensus.Notifies theserver daemonas soon as there is a leader
change.It coordinates with other peers in the network regarding
contesting elections, leader unavailability, network failure,
split brain situation etc.It usesmulticastfor peer discovery.When thefolder monitoring daemonstarts, it performs the
following stepsIndexes all the files in the shared folderUpdates the entries in the databaseInforms the server about the indexed files and folders.Any changes made in the shared folder will trigger thefolder
monitoring daemonto index the modified files, update the
database and then inform the server about the changesTheiwant clienttalks to theserver daemonwhen the user
wishes to:search for filesdownload fileschange shared folderchange download folderTheserver daemonreceives commands fromiwant clientand
updates fromfile monitoring and election daemon.Updates received fromfolder monitoring daemonis fowarded to
the leader. For example: indexed files/folders information.Updates received from theelection daemonlikeleader changeevent, triggers the server to forward the
indexed files/folders information to the new leaderQueries received from theiwant clientlikefile 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)Queries received from theiwant clientlikefile downloadis forwarded to the leader, who forwards the roothash of the
file/folder along with the list of peers who have the file. Theserver daemonthen intiates download process with peers
mentioned in the peers list.Updates received from theiwant clientlikechanging shared folder, triggers theserver daemonto make
sure that thefolder monitoring daemonindexes the new folder
and after indexing is complete, theserver daemonupdates the
leader with the new indexed files/folders meta information.TodoCreate test modulesMake download fasterIncorporate tight security mechanismsImprove UI for file/folder download progress barAdd streaming functionalityWhy it may not work?FirewallMulticast not supported in your router.ErrorsAll logs are present in~/.iwant/.iwant.logorAppData\Roaming\.iwant\.iwant.logLiked the project ?Any ideas, bugs or modifications required, feel free to me send me a
PR :)