All Projects → tpaschalis → goof

tpaschalis / goof

Licence: MIT license
Go Offer File - Easily serve files and directories over a network; a Golang implementation of `woof`.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to goof

Uguu
Simple lightweight temporary file hosting.
Stars: ✭ 359 (+1395.83%)
Mutual labels:  lightweight, file-sharing
k3s-on-prem-production
Playbooks needed to set up an on-premises K3s cluster and securize it
Stars: ✭ 108 (+350%)
Mutual labels:  lightweight
today-web
😐 A Java library for building web applications
Stars: ✭ 33 (+37.5%)
Mutual labels:  lightweight
docker-alpine-wkhtmltopdf
wkhtmltopdf alpine docker container with headless qt patches
Stars: ✭ 150 (+525%)
Mutual labels:  lightweight
media hub
Decentralized file sharing over LAN
Stars: ✭ 25 (+4.17%)
Mutual labels:  file-sharing
filesharing
Files sharing application made in PHP
Stars: ✭ 52 (+116.67%)
Mutual labels:  file-sharing
marketplace
A file sharing website using Laravel 5.5
Stars: ✭ 19 (-20.83%)
Mutual labels:  file-sharing
kula
Lightweight and highly extensible .NET scripting language.
Stars: ✭ 43 (+79.17%)
Mutual labels:  lightweight
syncdir
Automatically discover peers and synchronize a folder
Stars: ✭ 30 (+25%)
Mutual labels:  file-sharing
File-Sharing-Bot
Telegram Bot to store Posts and Documents and it can Access by Special Links.
Stars: ✭ 867 (+3512.5%)
Mutual labels:  file-sharing
tiny-skeleton-loader-react
zero dependency, ultra lightweight (1KB gzipped) skeleton loader component for react 🐥
Stars: ✭ 28 (+16.67%)
Mutual labels:  lightweight
ios-application
A native, lightweight and secure one-time-password (OTP) client built for iOS; Raivo OTP!
Stars: ✭ 581 (+2320.83%)
Mutual labels:  lightweight
dicomweb-pacs
Easy to use DICOMWEB enabled PACS with DIMSE services based on sqlite database
Stars: ✭ 42 (+75%)
Mutual labels:  lightweight
CIBYL
Lightweight curly-bracket language which compiles to Ruby and Crystal.
Stars: ✭ 45 (+87.5%)
Mutual labels:  lightweight
transfer-sh
Node.js CLI tool for easy file sharing using Transfer.sh
Stars: ✭ 24 (+0%)
Mutual labels:  file-sharing
neon
Neon is a modern VueJS design library built with Typescript and SASS
Stars: ✭ 19 (-20.83%)
Mutual labels:  lightweight
onionshare-android
Android version of OnionShare (under development)
Stars: ✭ 31 (+29.17%)
Mutual labels:  file-sharing
ostrio-analytics
📊 Visitor's analytics tracking code for ostr.io service
Stars: ✭ 14 (-41.67%)
Mutual labels:  lightweight
beercss
Build material design interfaces in record time... without stress for devs... 🍺💛
Stars: ✭ 223 (+829.17%)
Mutual labels:  lightweight
ColdStorage
Lightweight data loading and caching library for android
Stars: ✭ 39 (+62.5%)
Mutual labels:  lightweight

goof

An implementation of Simon's wonderful woof Python script in Golang.

It's 2018 and serving a file over a network is not as easy as it should be.. The original script, as well as this Go command-line application try to provide a solution to this problem.

Usage

The binary can either serve a file/directory or itself to the specified IP and port. If a URL is provided, it will download from that URL.
The help text is pretty straightforward and conveys the main idea.

$ ./goof --help

Serves a single file <count> times via http on port <port>, on IP address <ip_addr>.
If a directory is specified, a .zip archive of that directory archive is served instead.

If started with an url as an argument, goof will act as a client, and will download and save the file in the current directory.

Usage of ./goof:
  -c int
        -c <count>.      How many times the file or directory will get served. (default 1)
  -i string
        -i <ip_addr>.    The address to serve the file or directory from. (default "127.0.0.1")
  -p string
        -p <port>.       The port to serve the file or directory from. (default "8080")
  -s    -s.              When specified, goof will distribute/serve itself

Can only serve single files/directories
$ ./goof myfile
Now serving on http://127.0.0.1:8080/myfile
# after file has been received on the other end
Exiting gracefully...

$ ./goof http://ipv4.download.thinkbroadband.com:8080/10MB.zip
Download Progress : 10.0 MiB complete

File downloaded in: 4.531359s

$ ./goof -s 
Now serving on http://127.0.0.1:8080/goof

Installation

The code was developed using go v1.9.7, but should run on any non-totally-antiquated go version.
You can clone the repository or download the goof.go source file and then go build it to get the executable binary, or go install goof.go to put in on your $GOPATH/bin.
To access the binary from anywhere in your system, you can add its location to $PATH.

ToDo List

  • Add test coverage
  • Make code more Golang-idiomatic
  • Document and port on other platforms.
  • Test throughput limits
  • Get feedback for future improvements

Feedback

It's my first Go code that I'm getting out in public, so criticism and improvement points are not only welcome, but encouraged. Feel free to open an issue, or send me an email!

                    __ 
                   / _|
  ____  ___   ___ | |_ 
 / _  |/ _ \ / _ \|  _|
| (_| | (_) | (_) | |  
 \__, |\___/ \___/|_|  
  __/ |                
 |___/                 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].