文件共享:iPhone、Android、Windows之间互传文件,无需账号、无需安装。
215
Zero-dependency LAN file sharing between iPhone, Android and Windows — no cloud, no accounts, no app installs. Run one tiny Node.js server on any device, then open a browser on any other device on the same Wi-Fi / network to send and receive files.
Source code: github.com/itrice/quick-share
Works on: iPhone/iPad (Safari) · Android (Chrome) · Windows/macOS/Linux (any browser) · the device running the server.
Languages: the web UI supports English and 中文. It follows your
browser language automatically, and you can switch anytime with the button in
the header (中文 / English) — your choice is remembered.
http://192.168.1.5:8787 plus a QR code.received/ folder on
the host device and listed on the page, downloadable from any device.Files never leave your local network.
Requires Docker (Docker Desktop on Windows/macOS, or the Docker engine on Linux).
docker compose up -d
This builds the image, maps port 8787, and mounts the local ./received
folder so received files appear right next to the project files. Stop with
docker compose down; view logs with docker compose logs -f.
docker build -t quick-share .
docker run -d --name quick-share -p 8787:8787 -v ./received:/app/received quick-share
http://localhost:8787http://<this-PC's-LAN-IP>:8787 (same Wi-Fi) —
find the IP with ipconfig (Windows) or ip addr (Linux/macOS).received/ folder you mounted.8787:8787 (e.g. 9000:8787).Linux note: the container runs as an unprivileged user. If uploads fail with a write error, make the host folder writable by it:
sudo chown -R 1000:1000 ./received(this is not needed on Windows/macOS).
start.bat in this folder. (Or in a terminal:
node server.js.)node server.js
# or
./start.sh
On Android, install Termux, then pkg install nodejs and run the same command.
| Variable | Default | Meaning |
|---|---|---|
PORT | 8787 | TCP port |
HOST | 0.0.0.0 | Interface to bind (127.0.0.1 = only this PC) |
SHARE_DIR | ./received | Folder where received files go |
QS_MAX_MB | 2048 | Max upload size, 0 = unlimited |
Example: PORT=9000 QS_MAX_MB=0 node server.js
The project has a small automated test suite (no extra dependencies — it uses Node's built-in test runner, so it needs Node.js 18+):
npm test
It covers the file-API helpers (filename sanitizing, de-duplication, MIME
mapping, path-traversal guards) and an end-to-end run against a real server
instance (upload / download / delete, size limits, method errors, malformed
requests). The end-to-end tests use a temporary share folder and never touch
your real received/ folder.
received/ on the host.http://192.168.x.x:8787 address, not localhost, from other devices.localhost works but http://192.168.1.x:8787 does not, on the same PC
— your PC is routing traffic through a proxy / VPN app (the server even
warns about this at startup). The proxy tries to reach your LAN address and
fails. Fixes:
192.168.1.66
(or your LAN IP) to the bypass list, or enable "Bypass proxy servers
for local addresses". If you use a VPN app (Clash, V2Ray, etc.), enable
its "bypass LAN / private IPs" option instead.no_proxy, e.g.
export no_proxy=192.168.1.66,localhost,127.0.0.1.192.168.x.x address is the one to use;
restart the server if it changed. The startup screen self-checks every
printed address and marks any that aren't reachable (✓ / ⚠).Quick Share is a plain-HTTP tool for trusted local networks. Anyone who can reach the printed address can upload files to and download files from the share folder, and traffic is not encrypted. Do not forward the port to the public internet (no port forwarding, no UPnP, no exposing it in Docker/ngrok).
MIT. The bundled public/vendor/qrcode.js is the
QR Code Generator for JavaScript
by Kazuhiko Arase, also MIT-licensed.
Content type
Image
Digest
sha256:f2cf37300…
Size
55.1 MB
Last updated
2 months ago
docker pull itrice/quick-share