Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aburdulescu/ez
Easy to use cross-platform p2p file transfer tool for your local network
https://github.com/aburdulescu/ez
cross-platform file-sharing file-transfer local-network p2p peer-to-peer
Last synced: about 1 month ago
JSON representation
Easy to use cross-platform p2p file transfer tool for your local network
- Host: GitHub
- URL: https://github.com/aburdulescu/ez
- Owner: aburdulescu
- Created: 2020-09-13T11:12:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T14:55:13.000Z (about 1 year ago)
- Last Synced: 2024-06-21T13:48:03.084Z (6 months ago)
- Topics: cross-platform, file-sharing, file-transfer, local-network, p2p, peer-to-peer
- Language: Go
- Homepage:
- Size: 222 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ez
Easy to use cross-platform p2p file transfer tool for your local network.
## Getting started
There are 4 types of entities that participate in the transfer of a file:
- tracker(binary executable named `ezt`)
- seeder(binary executable named `ezs`)
- seeder client(binary executable named `ezl`)
- client(binary executable named `ez`)There needs to be one tracker and at least one seeder in order to start downloading files.
The tracker, as the name suggests, is responsible to track where the files are(i.e. it stores information about the seeders for each file)
and to respond to queries from the client about the files.The seeder has a list of files which it makes available for download and serves file chunks when requested by clients.
The seeder client manages the set of files which the seeder is responsible for.
The client lists the available files and downloads them if requested.
### Install
- [install golang](https://golang.org/doc/install)
- download binaries:```
go get -ldflags="-s -w" github.com/aburdulescu/ez/cmd/...
```### Simple setup
You need at least 2 machines(containers, VMs, native).
One will be the client and the other will be the server(tracker+seeder).
#### Machine1(server)
- setup the tracker
This is simple, just run the binary `ezt`.
- setup the seeder
The seeder needs some config flags when it's started:
```
Usage of ezs:
-dbpath string
path where the database is stored (default "./seeder.db")
-disable-log
disable logging
-seedaddr string
address to used by peers
-trackeraddr string
tracker address
```We need to provide `seedaddr` and `trackeraddr`, the rest will be left as default:
```
ezs -seedaddr "here goes the IP/name that is available to other machines" -trackeraddr "the IP/name of the tracker"
```If, for example, Machine1 can be reached by the IP 192.168.0.10, the seedaddr will be 192.168.0.10 and
the trackeraddr can be 192.168.0.10 or localhost because the tracker is on the same machine.```
ezs -seedaddr 192.168.0.10 -trackeraddr localhost
```- add files to seeder
`ezl` is used for adding files.
You can add a file:
`ezl add path_to_file`
And then list the available files:
`ezl ls`
This is the whole setup needed on the server machine.
#### Machine2(client)
First, you need to setup the tracker address:
`ez tracker tracker_address`
Now you can list the available files:
`ez ls`
And download one of them:
`ez get file_id`
### A more real setup
When serving multiple big files, it would be best to have the tracker and the seeders on separate machines.
Also there needs to be more than one seeder for each file, otherwise there is no point in using this tool.