bashalarmistalt GitHub avatar

decimen-optical-transfer

bashalarmistalt

一个概念验证项目,仅通过屏幕和摄像头将文件编码为不断滚动的动画二维码流,并利用喷泉编码(Luby变换)处理丢帧,实现设备间的文件传输。

Stars

179

7 天增长

暂无数据

Fork 数

25

开放 Issue

1

开源协议

MIT

最近更新

2026-07-30

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它演示了一种实用的无网络文件传输方式,无需应用或配对,并分享了针对浏览器兼容性和鲁棒解码的硬核细节。

适合谁使用

  • 探索离线数据传输方法的开发者
  • 研究光通信与喷泉编码的研究人员
  • 构建气隙或安全敏感系统的创客
  • 寻求无追踪本地传输的隐私倡导者

典型使用场景

  • 在无网络连接的两台设备间传输文件
  • 在气隙环境中安全交换敏感数据
  • 用喷泉编码原型化并测试光通信信道
  • 展示二维码流与浏览器视觉API的交互式教学示例

项目优势

  • 无需网络、应用或权限(仅需摄像头访问)
  • 喷泉编码保证即使丢帧也能正确解码;接收者可中途加入
  • 自描述帧实现自动会话恢复与重启
  • MIT开源许可,附带详细实现说明

使用前须知

  • 概念验证,吞吐量有限(仅支持512KB或2MB图像)
  • 需要明亮屏幕、稳定摄像头和HTTPS;iOS摄像头帧率存在兼容性问题
  • QR纠错等级设为最低(L)——依赖喷泉层处理擦除而非纠正错误

README 快速开始

Decimen Optical Transfer: fountain-coded QR file transfer

Send a file between two devices using nothing but a screen and a camera. One page displays the file as an endless stream of animated QR codes; another device points its camera at it and reconstructs the file. No network path between the devices, no app, no pairing, no permissions beyond the camera. The payload travels as light.

This is a minimal proof of concept extracted from a larger experiment that reached 128 KB/s phone-to-phone with denser frames, multi-code grids, and an error-corrected color channel. This PoC keeps only the essential trick and transmits a 512 KB image (or a 2 MB one, selectable in the sender's settings) at a comfortable rate.

Mid-transfer: a phone pulling a 2 MB image out of the air at 129 KB/s.

Try it

npm install
npm run dev
  • On the sending device (a laptop is ideal): open https://localhost:5173/send/ and it starts streaming immediately. Max screen brightness helps.
  • On the receiving device (a phone): open the Network URL Vite prints (https://:5173/receive/), accept the certificate warning once, tap Start camera, and point it at the code.
  • A few seconds later: Transfer Complete! and the received image, verified by hash.

Why the dev server is https-only: the receiver uses getUserMedia, and browsers remove that API entirely on insecure origins: a phone reaching your dev server over plain http has no camera, full stop (localhost is exempt, but your phone isn't localhost). That's a web platform rule, not a choice. The dev server therefore ships with a self-signed certificate (@vitejs/plugin-basic-ssl); the browser will warn on first visit. Tap "Show Details" then "visit this website" (iOS) or "Advanced" then "Proceed" (Android/desktop), and the page is still a secure context, so the camera works. The odd-looking lvh.me hosts Vite prints are a public convenience domain that resolves to 127.0.0.1 (same machine, nothing extra running).

Hold the phone steady, or better, prop it against something. Camera autofocus hunting from hand tremor is the #1 throughput killer.

How it works

The one-way channel problem. A screen-to-camera link has no back-channel: the receiver can't ask for retransmission, and it will inevitably miss frames (blur, refresh straddling, autofocus). Looping the frames and h

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

TanStack
精选
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web 开发前端框架
14,861
vercel-labs
精选
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

开发者工具代码质量与构建
1,985
Jakubantalik
精选
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI 与机器学习AI 智能体
1,191