Code Monkey home page Code Monkey logo

ftu's Introduction

ftu (FileTransferringUtility)

Send files through the Net !


โ— What is that ?

A P2P (decentralized) file sharing program, overcomplicated and an overengineered one.

โ— Why ?

Learning

โ— How does this work ?

In order to transfer one file on one computer to another - they need to establish a connection.

In order to establish a connection - there needs to be a 1) sender (server) (the owner of the file), waiting for connections, and a 2) receiver (client), who will try to connect to a sender (server). If the requirements are met - client will connect to server and the packet exchange will begin.

The server and the client needs to communicate with packets according to certain rules, given by a protocol.

The packet has its header and body. They are divided into several groups of use by headers, this way we can specify what kind of data is stored inside packet`s body and react accordingly.

Thus, with a connection and a way of communication, the sender will send some packets with necessary information about the file to the receiver that describe a filename, its size and a checksum. The client (receiver) will have the choice of accepting or rejecting the packet. If rejected - the connection will be closed and the program will exit. If accepted - the file will be transferred via packets.


โ— Installation

โ— From release (Pre-compiled)

  • Proceed to releases page
  • Choose a version/architecture you have and download an archive
  • Unpack an archive
  • If on GNU/Linux - run chmod +x install.sh && sudo ./install.sh

โ— From source (Compile it yourself) (You need Go and git to be installed on your machine)

  • git clone http://unbewohnte.xyz:3000/Unbewohnte/ftu
  • cd into the folder
  • If on GNU/Linux - run make && sudo make install or make && chmod +x install.sh && sudo ./install
  • else - cd into src/ folder and simply run go build; after that you`re free to put the binary wherever you desire

Now you have ftu installed !


โ— Usage

ftu -h - to print a usage message

ftu [FLAGs]

โ— FLAGs

  • -p [uint] for port
  • -r [true|false] for recursive sending of a directory
  • -a [ip_address|domain_name] address to connect to (cannot be used with -s)
  • -d [path_to_directory] where the files will be downloaded to (cannot be used with -s)
  • -s [path_to_file|directory] to send it (cannot be used with -a)
  • -? [true|false] to turn on|off verbose output
  • -v print version text
  • -l print license

โ— Examples

ftu -p 89898 -s /home/user/Downloads/someVideo.mp4 creates a node on a non-default port 89898 that will send "someVideo.mp4" to the other node that connects to you

ftu -p 7277 -a 192.168.1.104 -d . creates a node that will connect to 192.168.1.104:7277 and download served file|directory to the working directory

ftu -p 7277 -a 192.168.1.104 -d /home/user/Downloads/ creates a node that will connect to 192.168.1.104:7277 and download served file|directory to "/home/user/Downloads/"

ftu -s /home/user/homework creates a node that will send every file in the directory

ftu -r -s /home/user/homework/ creates a node that will send every file in the directory !RECUSRIVELY!


โ— Testing

make test or in "src" directory go test ./...


โ— License

GPLv3 license

ftu's People

Contributors

unbewohnte avatar

Watchers

 avatar

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.