Giter Site home page Giter Site logo

goof's Introduction

#goof - share files through HTTP protocol

goof (Go Offer One File) is a very simple tool to send and receive files on your local LAN.

Features include:

  • Serve files just for a given number of times and then exit.
  • Share a directory and it's sub directories over HTTP.
  • Serve only one specified file.
  • Receive files via a simple html form to upload files via /upload
  • Disable upload functionality
  • More to come..

Usage:

usage: goof [flags]
    -d=0: Max number of downloads
    -f="index.html": restrict to one file
    -h=false: show this help
    -host="0.0.0.0:8080": listening port and hostname
    -n=false: only allow downloads

Example:

stone@ppo2:/tmp$ ./goof -host="0.0.0.0:8080"
2012/01/17 16:15:10 Serving /tmp on http://0.0.0.0:8080/
2012/01/17 16:15:12 127.0.0.1:38345 GET /
2012/01/17 16:15:31 127.0.0.1:38347 GET /upload
2012/01/17 16:15:44 127.0.0.1:38347 POST linux_3.2.0-7.13.tar.gz

To upload files with curl:

stone@ppo2:/tmp$ curl -F [email protected]  http://remotehost:8080/upload

Note 1: You need the go runtime, http://golang.org/

Note 2: this is just a toy project in my adventures in the go language, it probably works but not the cleanest code around ;)

goof's People

Contributors

stone 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.