snowflake

zero-dependency · single binary · 55 KB

Share files like they're nothing.

One binary. No install, no npm, no accounts. Serve a file or folder over HTTP in one command — and watch it melt away after the first download.

~/downloads

$

curl -fsSL https://raw.githubusercontent.com/SodiqovSardor/snowflake/main/install.sh | bash
View on GitHub
  • MIT License
  • C++17
  • 55 KB binary
  • Linux/macOS

Features

Everything you need. Nothing you don't.

Zero Setup

Single binary, no dependencies, no config. chmod +x and go.

Blazing Fast

Native POSIX sockets, 4096-byte streaming chunks, zero-copy relay; file data never touches disk on the relay.

PIN Gate

lock mode generates a random 4-digit PIN; visitors see a clean entry screen.

Ephemeral Mode

once mode self-destructs the binary the instant a download completes.

File or Directory

Serve a single file or a full directory listing.

Minimal UI

Light/dark toggle, spinning snowflake, responsive, file-type SVG icons.

Dual Mode

Standalone embedded HTTP server, or relay mode via relay.js for remote/NAT access.

Tiny Binary

51 KB stripped, compiled with g++ -std=c++17 -Os -s.

Command reference

One command. Four modifiers.

snowflake send <PATH> [modifiers] [options]

Modifiers:  serve  once  lock  hide
Options:    --host <addr>   --port <num>
snowflake commands at a glance
CommandWhat it doesCopy
snowflake send . serveServe current directory
snowflake send file.iso serve onceSingle file, melt after first download
snowflake send . serve lockPIN-protected directory
snowflake send . serve lock once hideSilent, PIN, melt on first download
snowflake send . serve --host example.comRelay mode

Architecture

From browser to bytes, nothing in between.

Standalone — embedded HTTP server (default)

Phone / Tabletany browser
snowflakeC++ binary
Your Filesfile or dir

Relay --host, connects through relay.js for remote/NAT access

Remote Clientpublic web
relay.js:9000 control
snowflakebehind NAT

File data streams through the relay in memory — it never touches disk.

Security

Small binary. Small attack surface.

Build options

Pick your trade-off.

snowflake build targets
TargetSizeFlags
make size (default)55 KB-Os -s
make perf67 KB-O3 -flto
make static~900 KBfully static, portable
make debug~2 MB-O0, debug symbols

Test suite

36

tests, all pass

  • standalone / single-file serving
  • once-mode self-destruct
  • lock-mode PIN gate
  • hide mode
  • combined modifiers
  • relay mode
  • path-traversal blocking
  • 404 handling
  • CLI error cases

Install

Get snowflake. Two ways in.

$ curl -fsSL https://raw.githubusercontent.com/SodiqovSardor/snowflake/main/install.sh | bash