Skip to content
/ f.sh Public

A P2P CLI and REST tool to share files between 2 users

Notifications You must be signed in to change notification settings

dz-adman/f.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

f.sh

A P2P Cli and REST tool to share files between 2 users

FshServer

A simple Spring-Boot REST api that stands as an intermediate node which has only 1 job i.e. get the connection requests and share each other's connection info between 2 clients (SENDER & RECEIVER).

FshClient

This application is the one that represents a user as a SENDER or RECEIVER.
This application serves as a REST api (Spring-Boot) as well as a Shell (Spring-Shell) application.

Change or remove logging level config in application.properties file for REST api to enable logging.

Startup

Use your favourite method to run the application (preferred to run in terminal/cmd for best results). Application runs with a startup prompt as following:

Use 'help' command to see all the commands.

There are 3 command groups:
Commands: Initially available commands
SENDER: Commands that will be available for user type SENDER
REVEICER: Commands that will be available for user type SENDER

Commands that have * mark in front are not available at the moment.
Command availability changes after setting user profile as SENDER or RECEIVER and on connection status update.

Connection

Step1: set-profile command to set user profile as SENDER or RECEIVER.
Step2: my-addr command will provide application port, local ip and public ip.
Step3: sconnect or rconnect for connection request.

--addr : <your-ip>:<app-port> --id : your id (any unique string, preferred phone num)
--sid   : SENDER's Id
--rid   : RECEIVER's Id

How it works?

At SENDER's end, the file is split into partitions and sends them to RECEIVER one after the other serially.
At RECEIVER's end, the incoming partitions are appended to the file, thus, eventually making it complete file that is sent by SENDER.

Partition size varies (increases) for 1GB+ file, thus, limiting the number of requests to share file.

ENJOY SHARING !!!

About

A P2P CLI and REST tool to share files between 2 users

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages