Giter Club home page Giter Club logo

gowload's Introduction

gowload

Simple stupid dropbox-like application written in Go

The goal is to replace my current {Own|Next}Cloud on a gen 1 Rapsberry Pi, which is far too heavy for the board.

Goals

  • Simple standalone application to be used behind a reverse proxy
  • As few features as I can get with
  • Does not have to scale to a lot of users
  • Does not mess with files or access ; you can still FTP in, modify files, etc...
  • Works without JS, progressive enhancement

Design tradeoffs

  • Authentication is handled by Apache or Nginx used as a reverse
  • Users and their directory have to be created by hand

Key features

  • Directory browse
  • Public links
  • Whole folder download as .zip
  • Upload of multiple files

Known bugs/security issues

  • As the authentication is entirely handled by the reverse proxy, any local application that can issue requests to 127.0.0.1 with a X-Basic-Auth header set can impersonate an user. This does include any user that can port forward with SSH... TODO: replace it with unix sockets (should be trivial)
  • This program exposes the local filesystem to the web. It probably has A LOT of issues and is dangerous to use!

How to install/use

Build binary

  • Modify constants (directories) and ports to suit your needs
  • Go get any external dependency (As for now: "github.com/pierrre/archivefile/zip")
  • Go build!

Configure the reverse proxy (example with Nginx)

location /files/ {
	auth_basic             "Restricted";
    auth_basic_user_file   /etc/nginx/htpasswd;
    proxy_pass             http://127.0.0.1:3000;
	proxy_set_header	X-Basic-Auth $http_authorization;
 	proxy_redirect      off;
}
location /links/ {
    proxy_pass             http://192.168.0.15:3000;
	proxy_set_header	X-Basic-Auth "";
 	proxy_redirect      off;
}

gowload's People

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.