← 全部工具

deblasis/zioscp

热度 65 更新于 开发与构建

Drop-in scp replacement in Zig - resumable, parallel, pipelined SFTP transfers. Self-contained binary; macOS, Linux, Windows.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

zioscp

A drop-in scp replacement written in Zig. Same flags and syntax as scp, but it speaks SFTP under the hood, so it can resume interrupted transfers and run parallel transfers (file-level and single-file chunked). Works against any unmodified sshd.

Features

  • scp-compatible syntax: [user@]host:path paths, -r, -p, -P, -i.
  • Resume: a .zioscppart sidecar records progress; a re-run continues where

it left off instead of restarting. Download resume is integrity-checked: each completed chunk gets a SHA-256 MAC in a .zioscpmac file, so a partial that was corrupted on disk between runs is detected and re-fetched rather than trusted (offset-only resume cannot detect this).

  • Parallel transfers:
  • -r -j N fans a directory tree across N ssh connections (file-level).
  • -j N on a single large file shards it at offset ranges across N

connections (chunked concurrent writes/reads).

  • Pipelined single stream: the upload/download paths keep an adaptive,

BDP-sized window of SFTP requests in flight (sized from how long each ack recv blocks, not a fixed constant), so zioscp -j1 saturates the server and beats stock scp on large transfers even at zero added latency.

  • Bandwidth limiting (--bwlimit, paced at chunk granularity), progress

bar (TTY-gated), -v per-file logging, and permission + mtime preservation (-p).

Build and test

zig build          # build the binary -> zig-out/bin/zioscp
zig build test     # unit tests
just ci            # fmt-check + build + tests + cross matrix (what CI runs)
just integration   # SFTP round-trip tests vs a Docker sshd (heavier)

zioscp cross-compiles to Linux and Windows from any host (zig build -Dtarget=x8664-linux-gnu, ... x8664-windows-gnu). On Windows the default build is the self-contained libssh2 backend, which runs natively with no system ssh required; on mac/Linux the default drives the system ssh. just ci runs that cross matrix.

Transport backend

There are two interchangeable backends, selected with -Dbackend:

  • ssh (default on mac/Linux) drives the system ssh subprocess, so it

works anywhere OpenSSH is installed, with no bundled crypto.