← 返回
效率工具 中文

Sendme

Send and receive files peer-to-peer using the sendme protocol from iroh.computer. Use when the user wants to share files, transfer files between machines, se...
使用 iroh.computer 的 sendme 协议进行点对点文件收发。适用于用户分享文件、在设备间传输文件等场景。
muninn-huginn
效率工具 clawhub v0.1.4 1 版本 99877.5 Key: 无需
★ 2
Stars
📥 775
下载
💾 16
安装
1
版本
#latest

概述

Sendme

Peer-to-peer file transfer using iroh. No server uploads — files stream directly between machines via encrypted connections with automatic NAT traversal.

Installation

If sendme is not installed:

brew install sendme

Alternatively, install via Cargo: cargo install sendme

Sending Files

sendme send <path>
  • Accepts a file or directory path
  • Outputs a ticket — a long base32-encoded string the recipient needs
  • The process stays running until interrupted with Ctrl+C — the sender must remain online for the recipient to download
  • Present the ticket to the user and instruct them to share it with their recipient

Example:

sendme send ~/Documents/report.pdf
# Outputs: sendme receive blobaa...  (the ticket)

For directories, sendme bundles the entire folder recursively.

Non-Interactive / Headless Environments

sendme requires a TTY — it enables raw terminal mode for interactive features. In non-interactive environments (scripts, Docker, CI, agents), it will fail with:

Failed to enable raw mode: No such device or address

Use the Python PTY wrapper to provide a PTY and extract the ticket programmatically. This uses os.execvp() to invoke sendme directly without shell interpretation, avoiding shell injection risks:

import os, pty, select, signal, sys

def sendme_send(path):
    pid, fd = pty.fork()
    if pid == 0:
        os.execvp("sendme", ["sendme", "send", path])
    output = b""
    ticket = None
    while True:
        ready, _, _ = select.select([fd], [], [], 0.5)
        if ready:
            try:
                chunk = os.read(fd, 4096)
                if not chunk:
                    break
                output += chunk
                for line in output.decode(errors="replace").split("\n"):
                    if "sendme receive blob" in line:
                        ticket = line.strip().replace("sendme receive ", "")
                        print(ticket)
                        sys.stdout.flush()
            except OSError:
                break
        elif ticket:
            try:
                os.waitpid(pid, os.WNOHANG)
            except ChildProcessError:
                break
    try:
        os.kill(pid, signal.SIGTERM)
        os.waitpid(pid, 0)
    except (ProcessLookupError, ChildProcessError):
        pass
    return ticket

Receiving Files

sendme receive <ticket>
  • Downloads the file/folder to the current directory
  • Uses temporary .sendme-* directories during download, then moves atomically
  • Automatically verifies integrity via blake3 hashing
  • Resumes interrupted downloads automatically

Example:

sendme receive blobaafy...

Key Details

  • Connection: Direct peer-to-peer with TLS encryption. Falls back to relay servers if direct connection fails.
  • Resumable: Interrupted downloads continue from where they left off.
  • Integrity: All data is blake3-verified during streaming.
  • Speed: Saturates connections up to 4Gbps.
  • No size limit: Works with files and folders of any size.
  • Sender must stay online: The sendme send process must keep running until the recipient completes the download.

版本历史

共 1 个版本

  • v0.1.4 当前
    2026-03-29 11:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,951
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 446 📥 226,438
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 148,082