Giter Site home page Giter Site logo

share's Introduction

share - share files

A tiny personal minimalistic file-sharing service. Written in Go, minimal dependencies.

A screenshort of the page

Try it out!

docker run -it --rm -p 9999:9999 ghcr.io/heylu/share:main

Alternatively, clone the repo and run it using go run ..

Configuration

  • command line:

     -addr string
           The address the server is listening on. (default "localhost:9999")
     -uploads-dir string
           The directory to store the uploads in. (default "./uploads/")
    
  • BASE_URL (environment)

  • upload-secret.txt (a secret string that needs to be specified to be able to upload)

    • empty by default, allowing uploads by everyone
  • admin-secret.txt (optional, allows viewing usage stats at /stats with user admin + admin-secret)

  • code-only:

    • max upload size (50mb)
    • rate limit (1 upload request per 10 seconds)
    • expiry (14 days)

Features

(Unchecked items are not implemented yet.)

  • upload only with password
  • upload rate limiting
  • set content type for downloads
  • delete files after N days
  • admin stats (rate limiting, uploads, num downloads)
  • password encryption (optional, encrypted with password on disk, crypto/aes?)
    • seems extremely tricky, consider using WebCryptoAPI implementation from firefox send?
      • would like to keep it server-side though, to avoid JS as we did so far...
    • could do an "obfuscation" method for pseudo-security, i.e. security against novices, like me

Encryption ideas

  • encryption at rest, i.e. the server gets sent the plaintext
    • malicious code/servers could record the plaintext
  • crypto/aes (with sha256(password) as key) + cipher.NewOTR
  • password is also checked using bcrypt before attempting decryption

share's People

Contributors

dependabot[bot] avatar heylu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

gtaglang

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.