croc
Office Web - Source - Docker Image - Document
CROC 是一种工具,允许任意两台计算机简单安全地传输文件和文件夹。AFAIK,croc 是唯一可以执行以下所有功能的 CLI 文件传输工具:
- 允许任意两台计算机传输数据(使用中继)
- 提供端到端加密(使用 PAKE)
- 实现轻松的跨平台传输(Windows、Linux、Mac)
- 允许多个文件传输
- 允许恢复中断的传输
- 无需本地服务器或端口转发
- IPv6 优先,IPv4 回退
- 可以使用代理,如 Tor
部署教程
yaml
---
# 默认端口
services:
croc:
...
ports:
- 9009-9013:9009-9013
# 指定其它端口
services:
croc:
...
ports:
- 39009-39013:9009-9013使用教程
- 发布消息
bash
# 文件
croc send <file>
# 文字
croc send --text hello
# 使用自托管服务发送文件
croc --relay "myrelay.example.com:39009" send <file>
# 带密钥
CROC_SECRET=*** --relay "myrelay.example.com:39009" send <file>
# 或者设置环境变量
export CROC_RELAY="myrelay.example.com:39009"
export CROC_PASS="mycroc"