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.
$
curl -fsSL https://raw.githubusercontent.com/SodiqovSardor/snowflake/main/install.sh | bash- 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>| Command | What it does | Copy |
|---|---|---|
snowflake send . serve | Serve current directory | |
snowflake send file.iso serve once | Single file, melt after first download | |
snowflake send . serve lock | PIN-protected directory | |
snowflake send . serve lock once hide | Silent, PIN, melt on first download | |
snowflake send . serve --host example.com | Relay mode |
Architecture
From browser to bytes, nothing in between.
Standalone — embedded HTTP server (default)
Relay — --host, connects through relay.js for remote/NAT access
File data streams through the relay in memory — it never touches disk.
Security
Small binary. Small attack surface.
Path traversal blocked
..or/in download paths → 403PIN gate
Hides all content until unlocked
Zero disk writes on the relay
Data streams in memory
Zero external dependencies
No libcurl, no OpenSSL, no npm packages
Clean SIGINT shutdown
Ctrl+C exits gracefully
Safe URL encoding
Filenames with spaces/special characters handled correctly
Build options
Pick your trade-off.
| Target | Size | Flags |
|---|---|---|
make size (default) | 55 KB | -Os -s |
make perf | 67 KB | -O3 -flto |
make static | ~900 KB | fully 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 | bashgit clone https://github.com/SodiqovSardor/snowflake.git
cd snowflake
make size
make install