

A p2p file discovery and sharing tool for LANs
source link: https://www.tuicool.com/articles/7nMFfen
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

DIZTL
A peer-to-peer file discovery and sharing tool for LANs written in Go!
Getting started
The diztl project is written in Go with the frontend implementation in Java using JavaFX. To get started, run the following commands:
go get -v github.com/gravetii/diztl/...
Diztl requires Java 8 to be installed on the host machine for the UI to work.
Configuration steps
- Make a copy of the
config-template.yml
which is a bare-bones configuration file for diztl, and name itconfig.yml
-cp config-template.yml config.yml
. Theconfig.yml
file is the actual config file required for diztl to work. If you want to make any changes to the configuration, this is the file you want to edit. Note that this file is untracked in the repo (unlike theconfig-template.yml
) which ensures that changes specific to your environment aren't reflected publicly. If any changes are to be reflected publicly, they need to go into theconfig-template.yml
file. - Optionally, you can also add the
config.yml
entry in your.git/info/exclude
file so that git doesn't prompt you to add it to the stage all the time.
Running diztl
In the root folder of the project:
-
go run tracker/main.go
: This runs the tracker node on the localhost. - Specify the local IP address of the
Tracker
in theconfig.yml
file to allowNode
s to connect to it. -
go run node/main.go
: Run this anywhere on any machine in the network to fire up aNode
. - Fire up the UI (for this, currently, you'll have to build the code located in the
ui
folder and run it) and discover/share/download files in your network.
Implementation
Diztl consists of two main components:
- Tracker: The
Tracker
's responsibility is to allow co-ordination and communication between the differentNode
s. - Node: A
Node
is basically any peer in the network. It can share resources as well as request for and download resources from otherNode
s in the network.
The current implementation isn't completely decentralized in that the search queries from a Node
are sent to the Tracker
which then broadcasts the request across all peers in the network, requesting them to reply back with the files they have that might be of interest to the caller Node
.
Once the requesting Node
decides on the file it wants to download from the target peer, communication happens solely between the two peers without any intervention from the Tracker
.
When the Node
first starts up, it indexes all the files to be shared in the default share folder located under <user_root>/Documents/diztl/share
. By default, downloaded files are located under /downloads
directory of the shared folder. The Node
then connects to the Tracker
and registers itself after which it can participate in the network and communicate with other nodes. The share and downloads folders can be configured by changing the corresponding configurations in the config.yml
file (requires restart of tracker and/or node).
For the formats of different request-response structures, take a look at the diztl/diztl.proto
file which contains the protobuf specifications as well as the gRPC service definitions.
The node UI is implemented in Java using JavaFX which communicates with the node's gRPC server to facilitate user actions.
Built With
- gRPC: The project uses gRPC as its communication protocol along with protocol buffers as the data-interchange format.
- JFoenix: JFoenix is the material design library for JavaFX.
Screenshots
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to the project.
Authors
- Sandeep Dasika
Icons made by Kiranshastry from www.flaticon.com is licensed by CC 3.0 BY
Recommend
-
14
Kiterunner Introduction For the longest of times, content discovery has been focused on finding files and folders. While this approach is effective for legacy web servers that host static files or respond with 3xx’s upon a p...
-
6
IPFS - Content Addressed, Versioned, P2P File System今天要介绍的论文是 IPFS - Content Addressed, Versioned, P2P File System。这篇论文实际上是 IPFS 项目的白皮书,但是遵循鸭子原则,它看起来像是一片论文,我们就当作论...
-
10
Welcome to the Fastest Backlink Discovery Tool EverAoife McIlraithJun 15, 20217 min read
-
10
Twitter Adds New Spaces Sharing Options, New Search Tools to Improve Spaces Discovery Published July 29, 2021 By
-
7
Instagram Adds New 'Map Search' Tool to Maximize Business Discovery Published Sept. 14, 2021 By
-
6
Hi all, in the previous article, I have covered how to create a simple transaction system for our blockchain. So today, I will build the core compo...
-
5
Simple and fast p2p file transfer serviceSend files from one device to another by scanning a QR code. No compression, No size limit, Secure and Fast! Like AirDrop, but works on any device, OS or platform!
-
4
Simple file sharing tool Thanks to Kris' blog , i found woof ... This is a simple python script that will serve a specific file on http protocol when you just need to share quickl...
-
4
HardCIDR – Network CIDR and Range Discovery Tool December 29, 2022 Views: 716 HardCIDR is a Linux Bash script to discover the netblocks, or ranges, (in CIDR notation) owned by the target...
-
8
How to Install Resilio Sync File Sharing Tool on Ubuntu 22.04Resilio Sync is a proprietary peer-to-peer file synchronization tool for Linux, FreeBSD, Mac, Windows, Android, iOS, Amazon Kindle Fire, and NAS devices. It is a reliab...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK