两端机器都要装 qcp 并放在远程 PATH 中,或配置 SshSubsystem 模式;目标机需开放不被端口转换的 UDP 端口,默认 UDP 缓冲 4MB 可能需调整 sysctl.conf;qcp 会读取 ssh config,但不支持 Match 指令,需用 --ssh-config 指定替代配置。
qcp
crazyscotAGPL-3.0活跃维护用 QUIC 协议实现的命令行文件拷贝工具,比传统 scp 更快更稳,适合在不可靠网络下传大文件。
Quick File Copy using QUIC
cargo install --locked qcp
qcp myfile some-server:some-directory/README 未说明显存或 GPU 要求;为纯 CPU 的 Rust 程序,已在 Debian/Ubuntu、NixOS、OSX、Windows 11 的 x86_64/aarch64 上测试或可构建。
用 QUIC 替代 TCP 的 scp 兼容远程拷贝工具,专为高延迟长距离网络提升吞吐
用 QUIC 协议实现的命令行文件拷贝工具,比传统 scp 更快更稳,适合在不可靠网络下传大文件。
核心能力
- 命令语法与 scp 一致,可直接替换使用
- 通过 ssh 通道交换自签 TLS 证书后建立 QUIC 会话传文件
- 支持多源传输与目录递归,共用单条 ssh/QUIC 会话
- 可用 -j 调节并行传输度,用 --rx/--tx/rtt 按带宽调优
- 提供 --skip-existing、--preserve 与 --stats 等实用选项
容易踩的坑
- v0.9.1最新正式版2026-10-24 · 2026-10-24 03:41 UTC
🛡️ Security
- (deps) Update quinn, quinn-proto, rustls, rustls-webpki for recent advisories - (a2fd2f6)
⚙️ Miscellaneous Tasks
- Clippy fixes to date (inc nightly) - (9d94e46)
Download notes
- Debian and Ubuntu users will likely find the .deb packages convenient.
- Other Linux distributions, use
qcp-linux-<ARCH>-musl.tar.gz. These are static musl binaries which should work on all distributions.
- v0.9.02026-06-24 · 2026-06-24 11:38 UTC
查看更新说明
⛰️ Features
- (protocol) Add compatibility Level 5 - (41fe742)
- Add automatic parent directory creation for PUT and GET commands - (4386c82)
- Add --skip-existing option to skip files with the same size - (169995c)
- Consolidate parallel transfer improvements - (08e6433)
🐛 Bug Fixes
- (test) Apply provided patch for failing test - (3ff7119)
- Allow aes256 to be set in config file - (dcae896)
- Client-server deadlock with too many parallel transfers - (51d58a0)
📚 Documentation
- Add notes on parallel (-j) mode - (a7bbbdd)
⚙️ Miscellaneous Tasks
- Update warnings for options requested but not available on remote - (31a16d7)
- Remove async_trait crate - (db2fa58)
🚜 Refactor
- (put) Simplify destination path checks - (e0eab56)
- (tests) Improve macOS ignore messages for clarity - (e6f86b1)
- Job request processing fns take an Arc<Mutex> - (8f53489)
Download notes
- Debian and Ubuntu users will likely find the .deb packages convenient.
- Other Linux distributions, use
qcp-linux-<ARCH>-musl.tar.gz. These are static musl binaries which should work on all distributions.
- v0.8.32026-03-11 · 2026-03-11 07:09 UTC
查看更新说明
🛡️ Security
- (deps) Bump quinn-proto from 0.11.13 to 0.11.14 - (16aaaf5)
Download notes
- Debian and Ubuntu users will likely find the .deb packages convenient.
- Other Linux distributions, use
qcp-linux-<ARCH>-musl.tar.gz. These are static musl binaries which should work on all distributions.
- v0.8.2v0.8.2 (security)2026-02-09 · 2026-02-09 10:03 UTC
查看更新说明
A security re-release including fixes for the following dependency advisories:
- https://github.com/crazyscot/qcp/security/dependabot/7
- https://github.com/crazyscot/qcp/security/dependabot/8
🛡️ Security
- (deps) Bump time from 0.3.44 to 0.3.47 (#200) - (67250a7)
- (deps) Bump bytes from 1.11.0 to 1.11.1 (#199) - (5b89da2)
📚 Documentation
- Update performance tuning notes - (9b9806d)
🧪 Testing
- Get::permission_denied now runs on any unix build - (1a64cba)
Download notes
- Debian and Ubuntu users will likely find the .deb packages convenient.
- Other Linux distributions, use
qcp-linux-<ARCH>-musl.tar.gz. These are static musl binaries which should work on all distributions.
Contributors
- @dependabot[bot]
- v0.8.12026-01-10 · 2026-01-10 04:06 UTC
查看更新说明
A minor re-release of 0.8.0 that only really affects tests.
🐛 Bug Fixes
- (cli) Don't crash if terminal width detection gives an implausibly small number - (fe92b49)
- (test) Setup_tracing concurrency protection - (41c7fa2)
- (test) Rework permission-denied test to not rely on /etc/shadow being there - (5e8e457)
- (test) Non-portable assumption about $HOME - (64bf709)
- (test) Use echo binary from path - (8b81af1)
⚙️ Miscellaneous Tasks
Download notes
- Debian and Ubuntu users will likely find the .deb packages convenient.
- Other Linux distributions, use
qcp-linux-<ARCH>-musl.tar.gz. These are static musl binaries which should work on all distributions.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
The QUIC Copier (qcp) is an experimental
high-performance remote file copy utility for long-distance internet connections.
📋 Features
- 🔧 Drop-in replacement for
scp - 🛡️ Similar security to
scp, using existing, well-known mechanisms - 🚀 Better throughput on congested networks
News
- 0.9
- Configurable parallel transfer degree (
-j) - Faster recursive remote directory creation for deep trees
--skip-existingoption
- Configurable parallel transfer degree (
- 0.8 Added support for multi-source transfers and directory recursion
- 0.6 Improved TLS performance in some use cases (auto-selected cipher suite, RawPublicKey authentication)
- 0.5
- The default UDP buffer size is now 4MB. This may cause warnings until you have updated your sysctl.conf.
- New features:
--preserve;NewRenocongestion controller;--list-featuresmeta feature - New tuning options: UDP buffer size, MTU, packet loss detection thresholds
- 0.4 Added builds for OSX, Windows and BSD
- New features: Explicit username with
-l <login-name>; ssh subsystem mode
- New features: Explicit username with
- 0.3 was a total compatibility break with earlier versions.
For a full list of changes, see the changelog.
Compatibility
The protocol has been designed to be backwards and forwards compatible (since the 0.3 compatibility break).
Binaries which are different versions can interoperate, provided both sides support the required features. If you find they can't, or one side crashes, please report a bug.
Platform support status
At the time of writing, qcp has only been tested with the OpenSSH server and client.
| Platform | CPU architecture | Status |
|---|---|---|
| Debian, Ubuntu | x86_64, aarch64 | Well tested |
| Debian, Ubuntu | Others | Untested, should work |
| NixOS | x86_64 | Well tested |
| NixOS | aarch64 | Untested, should work |
| Other Linux | x86_64, aarch64 | Only indirectly tested** |
| OSX | x86_64 | Tested |
| OSX | aarch64 | Untested, should work |
| FreeBSD | x86_64 | Buildable as of 31/3/25, but untested |
| NetBSD | Ought to be buildable* | |
| OpenBSD | Ought to be buildable* | |
| Windows 11 | x86_64 | Tested |
* Note that the *BSD family are not tier 1 Rust platforms, so there is no guarantee that things will work properly. As of 31/3/25 some of these platforms have cross-compilation issues; I haven't tried native compilation.
** The binaries in the tarballs are the exact same binaries found in the Debian/Ubuntu packages. They are static linked, independent of libc versions, should work with any recent kernel.
🧰 Getting Started
- You must have ssh access to the target machine.
- You must also be able to connect to the target on a given UDP port.
- If the local machine is behind connection-tracking NAT, things usually work just fine. This is the case for the vast majority of home and business network connections.
- If the target is behind a firewall, you need to configure the firewall so at least some small set of UDP ports is
accessible, and not subject to network port translation.
(You can configure qcp to use a particular port range if you need to; see
--port/--remote-port.)- In different terms: The target machine will bind to a random UDP port, and advise its peer (via ssh) of its choice of port number.
- Install the
qcpbinary on both machines. It needs to be in yourPATHon the remote machine, or you need to set upSshSubsystemmode.- Check the platform-specific notes: OSX, Linux/other Unix, Windows
- If upgrading, remember to upgrade both machines if you want to take advantage of newer protocol features.
- Try it out! Use
qcpwhere you wouldscp, e.g.qcp myfile some-server:some-directory/ - Browse the tuning options in Configuration
- Set up a config file that tunes for your network connection. (You might find the
--statsoption useful when experimenting.)
Installing by package
These can be found on the latest release page.
| Platform | CPU | Packaging |
|---|---|---|
| Debian & Ubuntu | x86_64, aarch64 | Deb packages |
| Other Linux | x86_64, aarch64 | Use the unknown-linux-musl tarballs (they are cross-platform, static linked) |
| Nix | all | Flakes are provided: nix shell 'github:crazyscot/qcp?dir=nix' |
| NixOS | all | In progress; refer to pr#361923 |
| OSX | x86_64, aarch64 | Tarball (code signing TBD) |
| Windows | x86_64 | Zipfile (code signing TBD) |
Building from source
Prerequisites:
- Rust toolchain (see the next section if you don't know how to install this)
- A C compiler that the cc crate can use
You can install the package from source in one step using cargo:
cargo install --locked qcp
Or, if you prefer, clone the source repository in the usual way, then cargo build --release --locked.
If you are new to Rust and don't have the tools installed
- Install the
rustuptool via your package manager, or see Rust installation rustup toolchain install stablecargo install --locked qcp
⚙️ Usage
The basic syntax is the same as scp or rcp.
qcp [OPTIONS] <SOURCE>... <DESTINATION>
The program has a comprehensive help message, accessed via qcp -h (brief) or qcp --help (long form).
For example:
$ qcp my-server:/tmp/testfile /tmp/
⠂ Transferring data 2.1MB/s (last 1s)
testfile ████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░ 1s @ 6.71 MB/s [10.49 MB]
Things you should know:
-
qcp uses the ssh binary on your system to connect to the target machine. ssh will check the remote host key and prompt you for a password or passphrase in the usual way.
-
You can pass multiple
SOURCEarguments; the last path is treated as the destination, which must be a directory when copying more than one item. All files are transferred over a single ssh/QUIC session so you don't pay per-file connection setup costs. -
qcp will read your ssh config file to resolve any Hostname aliases you may have defined there. The idea is, if you can
sshto a host, you should also be able toqcpto it. However, some particularly complicated ssh config files may be too much for qcp to understand. (In particular,Matchdirectives are not currently supported.) In that case, you can use--ssh-configto provide an alternative configuration (or set it in your qcp configuration file).
Tuning
qcp's default configuration is for a 100Mbit symmetric connection, with 300ms round-trip time to the target server.
Naturally, you will get better performance if you set things up for your actual network connection.
For example, if you have 300Mbit/s (37.5MB/s) download and 100Mbit/s (12.5MB/s) upload, you might try this on the command line:
qcp my-server:/tmp/testfile /tmp/ --rx 37.5M --tx 12.5M
Performance tuning can be a tricky subject. See the performance documentation, and our recommended approach to building a configuration.
Persistent configuration
The useful options -- those you might want to use regularly including rx, tx and rtt -- can be specified
in a configuration file. See config for details.
For the example above, you might put this into ~/.qcp.conf or /etc/qcp.conf:
Host *
Rx 37.5M
Tx 12.5M
📖 How qcp works
The brief version:
- We ssh to the remote machine and run
qcp --serverthere (with no further args, i.e. you can usecommand="qcp --server"in your authorized_keys file)- there is also an option to use ssh subsystem mode, if you prefer to set that up
- Both sides generate a TLS key and exchange self-signed certs over the ssh pipe between them
- We use those certs to set up a QUIC session between the two
- We transfer files over QUIC
The protocol documentation contains more detail and a discussion of its security properties.
📘 Project Policies
⚖️ License
This project is released publicly under the GNU Affero General Public License.
Alternative license terms can be made available on request on a commercial basis (see below).
📋 SBOM
qcp draws on the Rust ecosystem. The various components used within the application are available under their own licenses.
To help you understand the legals and provide data for analysis tools, we automatically generate a Software Bill of Materials at build time.
This is included in the build bundles as qcp.cdx.xml. It's a CycloneDX BOM; for tools to process this information, see CycloneDX Tool Center.
🧑🏭 Bugs, Features & Contributions
Bug reports and feature requests are welcome, please use the issue tracker.
- It may be useful to check the issues list and the discussions first in case somebody else has already raised it.
- Please be aware that I mostly work on this project in my own time.
🚧 If you're thinking of contributing code, please read CONTRIBUTING.md.
Help wanted: Non-Linux platforms
I'd particularly welcome performance reports here, as they are not platforms I use regularly.
📑 Version number and compatibility
This project adheres to Semantic Versioning 2.0.0.
We also consider a change to be a breaking if a user might have to change something they do, even if the API remains compatible.
In its initial experimental phase, the major number will be kept at 0. Breaking changes will be noted in the changelog and will trigger a minor version bump.
Since 0.3 the protocol has been designed to be forwards and backwards compatible. In other words any two versions should be able to interoperate, provided they both support the required features.
The project will move to version 1.x when the protocol has stabilised.
Unsafe Rust
Any uses of unsafe Rust will be kept to a bare minimum and carefully reviewed.
Unsafe Rust is currently forbidden in the main qcp crate.
Test code (protected by #[cfg(test)]) may be exempted from this policy.
However we prefer that unsafe test code lives in the subcrate qcp-unsafe-tests.
💸 Supporting the project
If you find this software useful and would like to say thank you, please consider buying me a coffee or ko-fi. Github sponsorship is also available.
Please also consider supporting the galaxy of projects this work builds upon. Most notably, Quinn is a pure-Rust implementation of the QUIC protocol, without which qcp simply wouldn't exist in its current form.
If you're a business and need a formal invoice for your accountant, my freelancing company can issue the paperwork.
For this, and any other commercial enquiries please get in touch, to [email protected]. We would be pleased to discuss commercial terms for:
- Alternative licensing
- Support
- Sponsoring feature development
💡 Future Directions
Some ideas for the future, in no particular order:
- File checksum/hash checking/reporting
- Firewall/NAT traversal
- Interactive file transfer (akin to
ftp) - Smart file copy using the
rsyncprotocol or similar (send only the sections you need to) - Graphical interface for ftp mode
- Bind a daemon to a fixed port, for better firewall/NAT traversal properties but at the cost of having to implement user authentication.
- The same thing we do every night, Pinky. We try to take over the world!
See also the issues list.