@QingQ77: 在手机、电脑和浏览器之间可靠地传输文件,即便在 NAT、酒店 Wi-Fi、校园网等受限网络下也能走通,大文件支持断点续传。 https://github.com/shrimpsend/shrimpsend… ShrimpSend(虾传)是…

X AI KOLs Timeline 工具

摘要

ShrimpSend(虾传)是一个开源的跨平台文件传输系统,可在NAT、酒店Wi-Fi等受限网络下直连传输,支持断点续传,无需服务器中转即可在设备间直接传输文件。

在手机、电脑和浏览器之间可靠地传输文件,即便在 NAT、酒店 Wi-Fi、校园网等受限网络下也能走通,大文件支持断点续传。 https://github.com/shrimpsend/shrimpsend… ShrimpSend(虾传)是个跨平台传文件的系统,不走「上传→分享链接」那套路子,直接在设备之间建通道。同个局域网就走 HTTP 或 WebRTC 直传,跨网走不动就用服务器中继或 S3 兜底。大文件断了能续传,对方没装 App 也能用浏览器收。后端 Spring Boot + MySQL + Centrifugo 实时推送,客户端覆盖 iOS、Android、桌面三大平台和 Web。支持自己部署,也有官方托管版。
查看原文
查看缓存全文

缓存时间: 2026/06/18 08:11

在手机、电脑和浏览器之间可靠地传输文件,即便在 NAT、酒店 Wi-Fi、校园网等受限网络下也能走通,大文件支持断点续传。

https://github.com/shrimpsend/shrimpsend…

ShrimpSend(虾传)是个跨平台传文件的系统,不走「上传→分享链接」那套路子,直接在设备之间建通道。同个局域网就走 HTTP 或 WebRTC 直传,跨网走不动就用服务器中继或 S3 兜底。大文件断了能续传,对方没装 App 也能用浏览器收。后端 Spring Boot + MySQL + Centrifugo 实时推送,客户端覆盖 iOS、Android、桌面三大平台和 Web。支持自己部署,也有官方托管版。


shrimpsend/shrimpsend

Source: https://github.com/shrimpsend/shrimpsend

ShrimpSend (虾传)

English (default) | 简体中文

ShrimpSend

Reliable transfer between your devices — even on difficult networks.
LAN when possible. Relay when needed. Resume when interrupted.

License: AGPL-3.0-or-later Platforms Source repository

ShrimpSend — file transfer that works across any network

Official hosted services

ShrimpSend / 虾传 runs two official hosted editions from the same open-source codebase. Pick the site that matches where you are:

EditionWebsiteFor
China (国内版)xiachuan.netUsers in mainland China
Internationalshrimpsend.comUsers outside mainland China

You can also self-host the full stack on your own infrastructure under AGPL.

This repository (shrimpsend) is the open-source codebase for ShrimpSend / 虾传 — a self-hostable relay for your personal devices. Send text, clipboard snippets, images, videos, and large files between phones, desktops, and browsers. It is built for complex networks: go as fast as your LAN allows on direct paths, keep transfers alive across NAT and restrictive Wi‑Fi, and resume large files after disconnects. It is not a cloud drive and not an “upload, get a link, forward the link” workflow.

Why ShrimpSend

  • No install for recipients — send directly to browsers and temporary devices when the other side cannot install software.
  • Resume after disconnects — large native client ↔ client transfers continue from the interrupted position instead of restarting from 0%.
  • Works on restrictive networks — server-assisted relay when hotel Wi‑Fi, campus networks, or carrier NAT block direct reachability.
  • Breaks through one-way networks — firewalls and NAT often allow traffic in only one direction (e.g. phone → PC works, PC → phone does not). After sign-in, the server coordinates reachability probes between your devices; if direct HTTP push fails, ShrimpSend automatically reverse-pulls the file from the reachable side, or falls back to WebRTC / S3 relay. See shared/protocol.md.
  • LAN-first, still built for speed — prefer direct LAN / WebRTC on the same network; use relay or S3-compatible fallback only when needed.
  • Real-time syncCentrifugo pushes updates to every signed-in client on channel user#<userId>.
  • Self-host friendly — run the full stack on your infrastructure under AGPL-3.0-or-later; production secrets stay in private ops templates (docs/SELF_HOST.md).

Screenshots

ShrimpSend mobile app — device list

ShrimpSend desktop app — file transfer

ShrimpSend web app — browser client

ShrimpSend connection diagnostic — LAN, WebRTC, and S3 paths

Architecture

flowchart LR
  subgraph clients [Clients]
    Flutter[Flutter app]
    Web[Next.js web]
    OHOS[HarmonyOS app_ohos]
  end
  subgraph server [Self_host_stack]
    API[Spring_Boot :9000]
    RT[Centrifugo :8000]
    DB[(MySQL 8 :3306)]
    S3[S3 compatible storage]
  end
  Flutter --> API
  Web --> API
  Flutter --> RT
  Web --> RT
  API --> DB
  API --> S3
  Flutter -. LAN or WebRTC .- Flutter
ComponentPortRole
MySQL 83306Primary database
Centrifugo v68000WebSocket real-time
Spring Boot backend9000REST API, auth, S3 orchestration
Next.js web3000Browser client

Transfer paths: on the same LAN, HTTP direct push or reverse pull and optional WebRTC aim for maximum throughput; across restrictive or unstable networks, server-assisted relay and S3-compatible fallback keep delivery reliable. Large native transfers can resume after disconnects. Details: shared/protocol.md.

Tech stack

  • Backend: Spring Boot (Java 17), MySQL 8
  • Web: Next.js (React)
  • Clients: Flutter (iOS, Android, macOS, Windows, Linux), HarmonyOS (app_ohos/)
  • Real-time: Centrifugo

Deployment

Prerequisites

ToolVersion / notes
Java17+
Node.js20+ (for web/)
CentrifugoDev: ./scripts/install-centrifugo.sh (prefers centrifugo-bins); production: sync-to-build-machine.sh auto-fetches scripts/bin/linux/centrifugo (not in git)
MySQL8
FlutterOnly when building app/

Before first ./scripts/start-dev.sh: run cd web && npm ci and ./scripts/install-centrifugo.sh (or run ./scripts/sync-to-build-machine.sh earlier to fetch the Linux binary only). The start script picks scripts/bin/mac/ or scripts/bin/linux/ by OS.

Local development (China logic)

RoleSetupStart / stop
Maintainers (private ops/local/)./scripts/deploy-local.sh — syncs team config + creates ultrasend / ultrasend_overseas DBs./start-dev.sh or ./scripts/start-dev.sh · stop: ./stop-dev.sh
Contributors (examples only)./scripts/setup-local-config.sh — copies *.example templatesSame start/stop

Contributors only: create the MySQL database before first start:

CREATE DATABASE ultrasend CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Default JDBC: jdbc:mysql://localhost:3306/ultrasend, user root, password changeme. Override via backend/.env (SPRING_DATASOURCE_*).

ServiceURL
Centrifugohttp://localhost:8000
Backend APIhttp://localhost:9000
Web UIhttp://localhost:3000

Logs: scripts/logs/ · PID file: scripts/.dev-pids

Dev scripts live under scripts/ in this repo (not in the private ops repo), so paths to web/, backend/, and config.json resolve correctly. Root ./start-dev.sh / ./stop-dev.sh are shortcuts to scripts/.

Local development (Overseas / ShrimpSend logic)

Same config step as above (deploy-local.sh or setup-local-config.sh). Maintainers get ultrasend_overseas from deploy-local.sh.

./scripts/start-dev.sh --overseas
# Stop: ./scripts/stop-dev.sh

Uses Spring profile dev-overseas and database ultrasend_overseas. For Stripe membership testing, run in a separate terminal:

stripe listen --forward-to localhost:9000/api/membership/stripe/webhook

Backend-only debugging (no Centrifugo/Web): backend/scripts/run-dev-overseas.sh

Production (bare metal)

Requires an ops config directory synced into this repo. Full steps: docs/SELF_HOST.md.

git clone [email protected]:shrimpsend/shrimpsend.git shrimpsend
cd shrimpsend
git clone [email protected]:shrimpsend/public-ops.git ../ops   # samples; replace placeholders for production
# Maintainers: git clone [email protected]:shrimpsend/ops.git ../ops
# Optional: export ULTRASEND_OPS_DIR=/path/to/your-ops
./scripts/deploy.sh          # interactive: git pull, cn vs overseas, build, restart
./scripts/deploy.sh stop     # stop Centrifugo + backend + Web
./scripts/deploy.sh status
./scripts/deploy.sh logs

Non-interactive overseas deploy:

SPRING_PROFILE=prod-overseas CLUSTER_LABEL='Overseas (ShrimpSend)' ./scripts/deploy.sh

Docker (optional)

MySQL + Centrifugo + backend in containers; Web still runs on the host.

./scripts/setup-local-config.sh   # or deploy-local for ops/local/docker.env → .env
docker compose up -d
./scripts/start-dev.sh            # Web only path if you skip full stack script

See docs/README.zh-CN.md (Chinese, includes troubleshooting) · docs/SELF_HOST.md

Build clients (Flutter)

cd app
flutter pub get
flutter run
# Optional overrides:
# flutter run --dart-define=API_URL=http://localhost:9000 \
#   --dart-define=CENTRIFUGO_WS=ws://localhost:8000/connection/websocket

OpenPanel secrets and analytics: app/README.md.

Self-hosting and configuration

ScenarioConfigStart
Local (China)setup-local-config.sh or deploy-local.sh./scripts/start-dev.sh
Local (Overseas)same./scripts/start-dev.sh --overseas
Productionops/ sync via deploy.sh./scripts/deploy.sh
Docker.env + config.docker.jsondocker compose up -d

Full guide: docs/SELF_HOST.md · Chinese setup: docs/README.zh-CN.md

Official vs community builds

Trademarks ShrimpSend / 虾传 are not licensed under AGPL. Community forks must:

  1. Not ship under the ShrimpSend / 虾传 name, logo, or confusingly similar branding (including app stores).
  2. Use distinct application names and package/bundle IDs (Flutter applicationId, iOS bundle ID, etc.).
  3. Default API/WebSocket endpoints to your servers — not api.shrimpsend.com or api.xiachuan.net.
  4. Clearly state the deployment is independent (e.g. “AcmeSend — self-hosted, not affiliated with ShrimpSend”).

Official hosted services (reference only): shrimpsend.com (international), xiachuan.net (China). Full policy: TRADEMARK.md.

Project layout

shrimpsend/
├── backend/          # Spring Boot API
├── web/              # Next.js web app
├── app/              # Flutter clients
├── app_ohos/         # HarmonyOS
├── ops/              # Production templates (secrets gitignored)
├── shared/           # Protocol notes
├── config.json       # Centrifugo (generated locally)
└── docker-compose.yml

Features (overview)

  • User registration/login, JWT auth
  • Device registry with unique deviceId and display names
  • Real-time messages on user#<userId>
  • Text + file messages (S3 presigned upload/download)
  • Per-send choice: all devices (S3) or a specific peer (LAN direct when possible)
  • Browser receive without asking others to install the app
  • Resume large transfers after network drops (native client ↔ client)
  • Server-assisted paths across NAT, campus Wi‑Fi, and carrier networks (signed-in)
  • Settings: S3 credentials, device list, renames

Documentation

TopicDocument
Self-hostingdocs/SELF_HOST.md
Transfer protocolshared/protocol.md
Contributing + DCOCONTRIBUTING.md, DCO.md
Security disclosuresSECURITY.md
Setup guide (Chinese)docs/README.zh-CN.md
License (Chinese summary)LICENSE.zh-CN.md
Third-party licensesTHIRD_PARTY_NOTICES.md
Trademark / fork namingTRADEMARK.md

Contributing

Issues and pull requests: github.com/shrimpsend/shrimpsend. Read CONTRIBUTING.md (DCO sign-off required: git commit -s).

License

SPDX: AGPL-3.0-or-later

ShrimpSend / 虾传 is released under the GNU Affero General Public License v3.0 or later. You may use, modify, and self-host freely; if you modify the software and offer network access to users, AGPL requires making corresponding source available to those users.

DocumentDescription
LICENSEFull AGPL-3.0 text
LICENSE.zh-CN.mdChinese license summary
LICENSE-Commercial.mdEnterprise license (when AGPL is not acceptable)
TRADEMARK.mdTrademark and fork branding
THIRD_PARTY_NOTICES.mdThird-party dependency notices
CONTRIBUTING.mdContribution guide (incl. DCO)

相似文章

@ezshine: 分享一个开源项目,这个项目可以让你在自己的服务器上使用容器技术打开多个微信官方 Linux 客户端从而实现微信多开。 通俗点说,就像是你有好几台电脑,每台电脑开一个微信官方客户端,然后提供一个远程桌面让你登录操作电脑。所以这种登录微信的方…

X AI KOLs Timeline

分享一个开源项目 WechatOnCloud,它利用容器技术在自有服务器上运行多个独立的微信官方 Linux 客户端,并通过浏览器远程桌面管理,实现合规的微信多开与多端共享。

@IndieDevHailey: 亿万富翁 Jack Dorsey 开源的神级项目 Bitchat ,简直是现代黑科技! 完全不需要互联网,用蓝牙就能收发 #Bitcoin + 聊天!!! - 飞机上、演唱会、地铁、荒郊野外、断网灾区……信号全无也能实时通讯 + 转账 -…

X AI KOLs Timeline

Jack Dorsey 开源了 Bitchat 项目,这是一个无需互联网、利用蓝牙 Mesh 网络实现离线通讯和比特币转账的工具,支持多跳中继、Cashu eCash 离线转账和双重加密,适用于断网、监控等场景。

@yhslgg: 兄弟们,今天给你介绍一个宝藏工具,GitHub 上 21000 颗星,我自己用了之后直呼好家伙! 叫 SingleFile。 它只干一件事:把任何网页,完整打包成一个 HTML 文件,保存到本地。 图片、CSS、字体、样式,全部塞进同一个…

X AI KOLs Timeline

SingleFile 是一个免费开源的浏览器插件和CLI工具,能将任何网页完整打包成一个HTML文件,保存图片、CSS等,永久离线可用,支持自动保存、批量保存和云存储。