• Stars
    star
    193
  • Rank 201,052 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tera-scale file uploader

GoSƐ logo

GoSƐ - A terascale file-uploader

goreportcard Codacy grade License GitHub go.mod Go version Go Reference

GoSƐ is a modern and scalable file-uploader focusing on scalability and simplicity. It is a little hobby project I’ve been working on over the last weekends.

The only requirement for GoSƐ is a S3 storage backend which allows to it to scale horizontally without the need for additional databases or caches. Uploaded files a divided into equally sized chunks which are hashed with a MD5 digest in the browser for upload. This allows GoSƐ to skip chunks which already exist. Seamless resumption of interrupted uploads and storage savings are the consequence.

And either way both upload and downloads are always directed directly at the S3 server so GoSƐ only sees a few small HTTP requests instead of the bulk of the data. Behind the scenes, GoSƐ uses many of the more advanced S3 features like Multi-part Uploads and Pre-signed Requests to make this happen.

Users have a few options to select between multiple pre-configured S3 buckets/servers or enable browser & mail notifications about completed uploads. A customisable retention / expiration time for each upload is also selectable by the user and implemented by S3 life-cycle policies. Optionally, users can also opt-in to use an external service to shorten the URL of the uploaded file.

Currently a single concurrent upload of a single file is supported. Users can observe the progress via a table of details statistics, a progress-bar and a chart showing the current transfer speed.

GoSƐ aims at keeping its deployment simple and by bundling both front- & backend components in a single binary or Docker image. GoSƐ has been tested with AWS S3, Ceph’s RadosGW and Minio. Pre-built binaries and Docker images of GoSƐ are available for all major operating systems and architectures at the release page.

GoSƐ is open-source software licensed under the Apache 2.0 license.

Check our my blog article for more background info.

Features

  • De-duplication of uploaded files based on their content-hash
    • Uploads of existing files will complete in no-time without re-upload
  • S3 Multi-part uploads
    • Resumption of interrupted uploads
  • Drag & Drop of files
  • Browser notifications about failed & completed uploads
  • User-provided object expiration/retention time
  • Copy URL of uploaded file to clip-board
  • Detailed transfer statistics and progress-bar / chart
  • Installation via single binary or container
    • JS/HTML/CSS Frontend is bundled into binary
  • Scalable to multiple replicas
    • All state is kept in the S3 storage backend
    • No other database or cache is required
  • Direct up & download to Amazon S3 via presigned URLs
    • Gose deployment does not see an significant traffic
  • UTF-8 filenames
  • Multiple user-selectable buckets / servers
  • Optional link shortening via an external service
  • Optional notification about new uploads via shoutrrr
    • Mail notifications to user-provided recipient
  • Cross-platform support:
    • Operating systems: Windows, macOS, Linux, BSD
    • Architectures: arm64, amd64, armv7, i386

Roadmap

Checkout the Github issue tracker.

Demo (click for Live-Demo)

Gose demo screencast

Installation

Pre-compiled binaries from GitHub releases

Take the download link for your OS/Arch from the Releases Page and run:

sudo wget https://github.com/stv0g/gose/releases/download/v0.0.2/gose_0.0.2_linux_amd64 -O /usr/local/bin/gose
chmod +x /usr/local/bin/gose

Kubernetes / Kustomize

  1. Copy default configuration file: cp config.yaml kustomize/config.yaml
  2. Adjust config: nano kustomize/config.yaml
  3. Apply configuration: kubectl apply -k kustomize

Docker

Via environment variables in .env file:

docker run --env-file=.env --publish=8080:8080 ghcr.io/stv0g/gose

or via a configuration file:

docker run -v$(pwd)/config.yaml:/config.yaml --publish=8080:8080 ghcr.io/stv0g/gose -config /config.yaml

Docker Compose

We ship a docker-compose.yml file to get you started. Please adjust the environment variables in it and then run:

docker-compose up -d

Configuration

Gose can be configured via a configuration file and/or environment variables

File

For reference have a look at the example configuration file.

Environment variables

All settings from the configuration file can also be set via environment variables:

Variable Default Value Description
GOSE_LISTEN ":8080" Listen address and port of Gose
GOSE_BASE_URL "http://localhost:8080" Base URL at which Gose is accessible
GOSE_STATIC "./dist" Directory of frontend assets (pre-compiled binaries of GoSƐ come with assets embedded into binary.)
GOSE_BUCKET gose-uploads Name of S3 bucket
GOSE_ENDPOINT (without http(s):// prefix, but with port number) Hostname:Port of S3 server
GOSE_REGION us-east-1 Region of S3 server
GOSE_PATH_STYLE false Prepend bucket name to path
GOSE_NO_SSL false Disable SSL encryption for S3
GOSE_ACCESS_KEY S3 Access Key
GOSE_SECRET_KEY S3 Secret Key
GOSE_SETUP_BUCKET true Create S3 bucket if do not exists
GOSE_SETUP_CORS true (if supported by S3 implementation) Setup S3 bucket CORS rules
GOSE_SETUP_LIFECYCLE true (if supported by S3 implementation) Setup S3 bucket lifecycle rules
GOSE_SETUP_ABORT_INCOMPLETE_UPLOADS 31 Number of days after which incomplete uploads are cleaned-up (set to 0 to disable)
GOSE_MAX_UPLOAD_SIZE 1TB Maximum upload size
GOSE_PART_SIZE 16MB Part-size for multi-part uploads
AWS_ACCESS_KEY_ID alias for GOSE_ACCESS_KEY
AWS_SECRET_ACCESS_KEY alias for GOSE_SECRET_KEY

Configuration of link shortener and notifiers must be done via a configuration file.

Author

GoSƐ has been written by Steffen Vogel.

License

GoSƐ is licensed under the Apache 2.0 license.

More Repositories

1

unicode-emoji

Apple, Android and Standard (Symbola) Unicode Emojis for Pidgin
Shell
174
star
2

transwhat

A gateway between the XMPP and the WhatsApp IM networks
Python
123
star
3

stm32cube-gcc

A developement environment for projects based on the STM32Cube firmware.
Makefile
88
star
4

cunicu

A zeroconf peer-to-peer mesh VPN using Wireguard® and Interactive Connectivity Establishment (ICE)
Go
70
star
5

libqt-omd

'libqt-omd' is a software library to control Olympus OM-D and Pen digital cameras over wifi
C++
38
star
6

c11-queues

A single producer single - single consumer queue implemented by a ring buffer with C11's 'stdatomic.h'
C
35
star
7

eagle

My Cadsoft Eagle libraries, settings, CAM jobs etc..
29
star
8

gont

A testing framework for distributed Go applications
Go
25
star
9

cfac

Code for Aachen - A Go API for accessing real-time information in the city of Aachen
Go
18
star
10

xilinx-hw-server-docker

Run a Xilinx hw_server in a Docker container
Dockerfile
17
star
11

usbasp

USB programmer for Atmel AVR controllers
C
17
star
12

pastie

An OpenCV/Qt GUI with focus on PCB analysis and robot control using latest technologies (C++11, Qt 5.4, OpenCV 3.0)
C++
11
star
13

snippets

Meine Werkzeugssammlung
PHP
9
star
14

dmm_ut61e

C code to retrieve readings from my Uni-Trend multimeter
C++
7
star
15

netgear-nighthawk-mobile

Scripts, details and more around hacking with Netgear Nighthawk Mobile 5G/LTE Routers
Python
6
star
16

netplika

Configure Linux' network emulation queuing discipline
C
4
star
17

rwth-info3

Mein Code des 2. Info Praktikums an der RWTH
C++
4
star
18

transcode

transcode translates standard ANSI C-code simultaniously into assembler and byte code.
PHP
4
star
19

fritz-dns

Fritz-DNS is a small authorative DNS server which serves A/AAAA resource records for local hosts connected to an AVM Fritz Box home WiFi router.
Go
4
star
20

vand

A Van/Camper automation and monitoring daemon
Go
3
star
21

rwth-info2

Alle Versuche meines Informatik 2 Praktikums (Eclipse Workspace)
C++
3
star
22

go-babel

A implementation of the Babel routing protocol in Go
Go
3
star
23

gdoid

GDOI Reference Implementation for IEC 61850-90-5
C
3
star
24

calcelestial

calcelestial calculates positions, rise & set times of celestial bodies
C
3
star
25

iec61850-90-5

Example IEC61850-90-5 implementation by SISCO and donated to UCAIUG
C
2
star
26

pion-perfect-negotation

An example for performing perfect negotation with pion/webrtc
Go
2
star
27

rwth-misc

Some misc stuff created for my studies
TeX
2
star
28

noxon

Some research work on my Terratec Noxon internet radio
PHP
2
star
29

first_lines

Some code snippets from old times...
Visual Basic
1
star
30

libfn

fnordlicht library & sample code in ansi c
Shell
1
star
31

rwth-info1

Lösungen zu den Aufgaben der KGÜ Informatik 1 im WS 2010/11 an der RWTH Aachen
C
1
star
32

ndame_java

Java/Backtracking implementation of th n-dame problem
Java
1
star
33

keyrings.passwordstore

Password-store backend for Python keyring package
Python
1
star
34

hidekey

HIDeKey keeps your credentials or one time passwords secret
C
1
star
35

geoportal

Cancelled project on managing geodata
PHP
1
star
36

qtmatrix

My first steps with QT
C++
1
star
37

rwth-uctetris

Sourcecode und Layout unseres Projekts für die Mikrocontroller AG des MMI's im 2. Semester
C
1
star
38

2d_autos

Simple 2D racing game coded with Delphi
Pascal
1
star
39

modbus-sniffer

MQTT Firmware Extension for 1st generation LG ESS BESS
Go
1
star
40

pushfin

Publishes bank account statements via MQTT and Pushover.
Python
1
star
41

pyspectrum2

pyspectrum2
Python
1
star
42

2d_balls

Yet unfinished billiard, golf simulation in Java
Java
1
star
43

potenz

Simple project to learn for school
Pascal
1
star
44

lacube

Some C++ and SDL matrix calculus
C++
1
star
45

3d-printing

Some 3D models I created for 3D printers
1
star