Giter Club home page Giter Club logo

p2p-file-sharing's Introduction

P2PFileSharing

File sharing in P2P manner through LAN

Warning: This application may have bugs, please use it with caution. (ps: Although there is still a gap between this application and a real p2p application. But we have at least achieved a distributed file transfer.)

image issue license last_commit

Application architecture

Peer will start a non-blocking listener service to receive requests from other nodes and pass them to the handler. It will also start a non-blocking service to listen for input from stdin and forward these commands to the handler or CLI for execution. For example, we can request the CLI to check which nodes are online, and it will retrieve the data from the cache and provide the information. Similarly, when we want to download a file, we provide the handler with the information of the file, and it will send a download request on our behalf. Additionally, the handler will be called back when it receives a request from another node. It is important to note that the cache contains runtime data, including details about the currently online nodes and files shared by other nodes.

Usage

Please check out the tutorial on my blog.

Contributing

Contributions must be available on a separately named branch based on the latest version of the main branch.

p2p-file-sharing's People

Contributors

dependabot[bot] avatar mgmcn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

liulime

p2p-file-sharing's Issues

Test

Improve the test code

how to build?

these commands is outdated

$ go get -t github.com/libp2p/[email protected]
$ go get -t github.com/chzyer/readline
$ go mod tidy
$ go build -o p2pnode ./main

now what is the correct and working command line?

$ go install github.com/libp2p/go-libp2p@latest
$
$
$

folder

Hello.
Will it be possible to send entire folders in the future release?

for real use it should also be possible to issue the various commands in a non-interactive way

Anyway, excellent idea, I don't know any programs similar to this one that can be used from a command line.

Refactoring

This project is not very graceful and needs to be refactored.

Documentation

Detailed documentation and code annotations will be provided in the future.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.