Linux command
croc 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Send file
croc send [file]
Send multiple files
croc send [file1] [file2] [file3]
Send directory
croc send [directory/]
Receive file
croc [code-phrase]
Send with custom code
croc send --code [my-secret-code] [file]
Use custom relay
croc --relay [relay.example.com:9009] send [file]
Run relay server
croc relay
说明
croc is a tool for securely transferring files between computers. It uses a relay server and PAKE (Password Authenticated Key Exchange) for end-to-end encryption, ensuring that transferred files cannot be read by the relay server or intercepted on the network. The tool works across different networks without requiring port forwarding or firewall configuration. Users share a short code phrase, both parties connect to a relay server, and files are transferred through an encrypted channel. Local network transfers automatically use direct connections for faster speeds when possible. Features include resumable transfers (if interrupted, transfers can continue from where they left off), support for sending multiple files and entire directories, cross-platform compatibility (Linux, macOS, Windows), and the option to run your own relay server for complete control.
参数
- --code _phrase_
- Use custom code phrase
- --relay _address_
- Specify relay server
- --yes
- Accept transfer without prompt
- --out _path_
- Output directory for received files
- --overwrite
- Overwrite existing files
- --curve _type_
- Encryption curve (p256, p384, p521, siec)
- --hash _algorithm_
- Hash algorithm (xxhash, imohash, md5)
- --no-compress
- Disable compression
- --no-local
- Disable local network transfer
- --ports _range_
- Port range for local transfer
FAQ
What is the croc command used for?
croc is a tool for securely transferring files between computers. It uses a relay server and PAKE (Password Authenticated Key Exchange) for end-to-end encryption, ensuring that transferred files cannot be read by the relay server or intercepted on the network. The tool works across different networks without requiring port forwarding or firewall configuration. Users share a short code phrase, both parties connect to a relay server, and files are transferred through an encrypted channel. Local network transfers automatically use direct connections for faster speeds when possible. Features include resumable transfers (if interrupted, transfers can continue from where they left off), support for sending multiple files and entire directories, cross-platform compatibility (Linux, macOS, Windows), and the option to run your own relay server for complete control.
How do I run a basic croc example?
Run `croc send [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --code _phrase_ do in croc?
Use custom code phrase