# croc | Zack | Knowledge Base | Instagit

Easily and securely send things from one computer to another :crocodile: :package:

GitHub Stars: 37.7k

Repository: https://github.com/schollz/croc

---

## Articles

### [Understanding the croc Stored Transfer Protocol and Client-Side Encryption](/schollz/croc/what-is-the-croc-stored-transfer-protocol-and-client-side-encryption)

Learn about the croc stored transfer protocol and client-side encryption. Securely upload files using AES-GCM encryption for ultimate privacy.

- Tags: deep-dive
- Published: 2026-07-30

### [How croc Integrates with SOCKS5 and HTTP Proxies: CLI Flags and Implementation Details](/schollz/croc/how-does-croc-integrate-with-socks5-and-http-proxies)

Learn how croc integrates with SOCKS5 and HTTP proxies using CLI flags. Discover implementation details in Go and leverage proxy dialers for secure connections.

- Tags: how-to-guide
- Published: 2026-07-30

### [How croc's --store Feature Handles Encrypted Temporary File Storage](/schollz/croc/how-does-crocs-store-feature-handle-encrypted-temporary-file-storage)

Discover how croc's --store feature secures your files with local AES-GCM encryption before temporary storage. Protect your data from prying eyes.

- Tags: internals
- Published: 2026-07-30

### [Croc Reconnect Mechanism: How It Resumes Interrupted File Transfers Automatically](/schollz/croc/what-is-crocs-reconnect-mechanism-for-interrupted-transfers)

Croc automatically resumes interrupted file transfers with its reconnect mechanism. It uses exponential back-off delays and retries up to 10 times without manual intervention.

- Tags: internals
- Published: 2026-07-30

### [How croc's PAKE-Based End-to-End Encryption Works: Secure File Transfer Handshake Explained](/schollz/croc/how-does-crocs-pake-based-end-to-end-encryption-work)

Understand croc's PAKE-based end-to-end encryption. Learn how croc establishes a secure channel using a human-readable code for protected file transfers before sending data.

- Tags: deep-dive
- Published: 2026-07-30

### [What Programming Languages Are Used in Croc Development?](/schollz/croc/croc-development-languages)

Discover the programming languages behind Croc development. Learn how Go powers the core CLI and networking, while TypeScript builds the web interface.

- Tags: faq
- Published: 2026-07-27

### [How to Use croc with Custom Relay Servers: Complete Configuration Guide](/schollz/croc/croc-custom-relay-servers)

Learn to configure croc with custom relay servers using the --relay, --relay-ports, and --relay-password flags for secure file transfers. Get started now.

- Tags: how-to-guide
- Published: 2026-07-27

### [Best Alternatives to croc for Secure File Transfer: 8 Tools Compared](/schollz/croc/croc-alternatives-file-transfer)

Explore the best alternatives to croc for secure file transfer. Compare 8 top tools like rsync, magic-wormhole, and Syncthing to find your perfect fit.

- Tags: comparative-analysis
- Published: 2026-07-27

### [croc Protocol Specification: Technical Deep Dive into Secure File Transfer](/schollz/croc/croc-protocol-specification)

Explore the croc protocol specification for secure file transfer. Learn how this PAKE-authenticated, end-to-end encrypted TCP protocol safely exchanges files without exposing keys to relays.

- Tags: deep-dive
- Published: 2026-07-27

### [Security Vulnerabilities in croc: A Code-Level Analysis of Cryptographic Weaknesses](/schollz/croc/croc-security-vulnerabilities)

Discover security vulnerabilities in croc including weak PBKDF2 iteration counts enabling brute-force attacks. Understand code-level cryptographic weaknesses to protect your transfers.

- Tags: security-analysis
- Published: 2026-07-27

### [How to Build croc from Source: Complete Installation Guide](/schollz/croc/how-to-build-croc-from-source)

Build croc from source with our complete installation guide. Install Go, clone the repository, and compile the binary or use go install for a quick setup.

- Tags: tutorial
- Published: 2026-07-27

### [Performance Considerations for croc: Optimizing Peer-to-Peer File Transfers](/schollz/croc/croc-performance-considerations)

Optimize croc peer-to-peer file transfers with chunked streaming, compression, and hashing. Tune performance via CLI flags and buffer settings for faster, secure transfers.

- Tags: performance
- Published: 2026-07-27

### [How to Transfer Multiple Files with croc: A Complete Guide](/schollz/croc/croc-transfer-multiple-files)

Learn how to transfer multiple files with croc using simple commands and wildcards. Securely send several files in one session and understand its multiplexing features.

- Tags: how-to-guide
- Published: 2026-07-27

### [How to Configure croc for a Local Network: Complete Setup Guide](/schollz/croc/croc-configure-local-network)

Learn how to configure croc for a local network with this setup guide. Disable automatic relays, host your own, and ensure matching ports for secure file transfers.

- Tags: how-to-guide
- Published: 2026-07-27

### [How Croc Derives the Room Name from a Code Phrase](/schollz/croc/how-is-the-room-name-derived-from-the-code-phrase-in-croc)

Discover how croc derives the room name using SHA-256 hashing of code phrases and random suffixes to create unique, deterministic identifiers for secure file transfers.

- Tags: internals
- Published: 2026-07-26

### [PAKE Initialization Details in src/croc/croc.go: How croc Bootstraps Encryption](/schollz/croc/what-are-the-pake-initialization-details-in-src-croc-croc-go)

Discover PAKE initialization details in src croc croc.go. Learn how croc bootstraps encryption using role-specific curve initialization and sliced shared secrets for secure session key derivation.

- Tags: internals
- Published: 2026-07-26

### [How croc Handles Data Compression Using the compress.go Package](/schollz/croc/how-is-compression-handled-in-croc-using-the-compress-go-package)

Discover how Croc handles data compression using the compress.go package and Go's standard flate library. Learn about Compress and Decompress functions for efficient encoding.

- Tags: internals
- Published: 2026-07-26

### [Message Protocol Definitions in `message.go`: How Croc Structures Peer-to-Peer Communication](/schollz/croc/what-are-the-message-protocol-definitions-in-message-go)

Explore message protocol definitions in schollz/croc's message.go. Learn how JSON structs and constants structure secure peer-to-peer communication with optional compression and encryption.

- Tags: internals
- Published: 2026-07-26

### [Encryption Utilities in the croc crypt.go Package: AES-GCM and ChaCha20-Poly1305](/schollz/croc/what-encryption-utilities-are-provided-by-the-crypt-go-package)

Explore AES-GCM and ChaCha20-Poly1305 encryption utilities in the croc crypt.go package. Secure your data with these powerful Go functions.

- Tags: internals
- Published: 2026-07-26

### [How the Communication Layer in comm.go Works in croc](/schollz/croc/how-does-the-communication-layer-in-comm-go-work-in-croc)

Explore the communication layer in croc's comm.go. Learn how it uses magic-byte framing, length-prefixed messages, and timeout handling for robust data transfer.

- Tags: internals
- Published: 2026-07-26

### [What Is tcp.go in the Croc Relay Server? A Deep Dive into the TCP Implementation](/schollz/croc/what-is-the-role-of-tcp-go-in-the-croc-relay-server-implementation)

Explore tcp.go in the croc relay server. Understand its role in TCP implementation, connection handling, PAKE authentication, and bidirectional data transfer between peers.

- Tags: deep-dive
- Published: 2026-07-26

### [How `croc`'s `cli.go` Handles Command-Line Argument Parsing: A Deep Dive](/schollz/croc/how-does-the-cli-go-package-handle-argument-parsing-in-croc)

Explore how croc's cli.go parses command-line arguments using a layered architecture with global flags, subcommands, and intelligent routing for send/receive operations.

- Tags: deep-dive
- Published: 2026-07-26

### [Understanding the croc.go Main Client Implementation in Croc](/schollz/croc/what-is-the-purpose-of-the-croc-go-main-client-implementation)

Discover the croc.go main client implementation in schollz/croc. Learn how it orchestrates file transfers, from discovery to secure data streaming and reconnections.

- Tags: internals
- Published: 2026-07-26

### [How to Troubleshoot Common Issues with croc: Complete Diagnostics Guide](/schollz/croc/how-can-i-troubleshoot-common-issues-with-croc)

Troubleshoot common croc issues. Verify relay ports, set CROC_SECRET, bypass prompts with --yes, and enable debug for connection logs. Get croc running smoothly.

- Tags: how-to-guide
- Published: 2026-07-26

### [Security Considerations When Using croc: End-to-End Encryption and Relay Architecture Explained](/schollz/croc/what-are-the-security-considerations-when-using-croc)

Explore security considerations for croc. Understand end-to-end encryption, relay architecture, and crucial passphrase strength for secure file transfers.

- Tags: deep-dive
- Published: 2026-07-26

### [How to Self-Host a croc Relay Server: Complete Setup Guide](/schollz/croc/how-can-i-self-host-a-croc-relay-server)

Learn how to self-host a croc relay server with this complete setup guide. Build your own secure file transfer infrastructure independent of the public relay.

- Tags: how-to-guide
- Published: 2026-07-26

### [Complete Guide to Croc CLI Options for Configuration](/schollz/croc/what-are-the-available-croc-cli-options-for-configuration)

Explore comprehensive croc CLI options for configuration. Discover global flags and subcommand specific settings to customize your secure file transfers.

- Tags: api-reference
- Published: 2026-07-26

### [How Croc Supports Reconnection and Resuming Interrupted Transfers](/schollz/croc/how-does-croc-support-reconnection-and-resuming-interrupted-transfers)

Learn how Croc ensures reliable file transfers by automatically resuming interrupted transfers through reconnection, exponential backoff, and chunk-level resumption.

- Tags: internals
- Published: 2026-07-26

### [How croc Handles Local Relay and Peer Discovery: A Deep Dive into the Source Code](/schollz/croc/what-is-the-process-for-local-relay-and-peer-discovery-in-croc)

Explore croc source code to understand its local relay and peer discovery process. Learn how it establishes direct LAN connections and falls back to public relays.

- Tags: deep-dive
- Published: 2026-07-26

### [How Croc Handles File Metadata and Integrity Verification: A Deep Dive into the Source Code](/schollz/croc/how-does-croc-handle-file-metadata-and-integrity-verification)

Explore croc's source code to understand how it verifies file integrity and handles metadata. Learn about cryptographic hashes and real-time validation for secure transfers.

- Tags: deep-dive
- Published: 2026-07-26

### [How Files Are Transferred in Chunks Using Croc: Architecture and Workflow](/schollz/croc/how-are-files-transferred-in-chunks-using-croc)

Learn how croc transfers files by splitting data into chunks, detecting missing segments, and retransmitting only requested parts for efficient resumable transfers over any network.

- Tags: architecture
- Published: 2026-07-26

### [How the Croc Relay System Works as a Message Broker](/schollz/croc/how-does-the-croc-relay-system-work-as-a-message-broker)

Discover how the croc relay system functions as a message broker forwarding encrypted byte streams securely via PAKE authentication. It acts as a bidirectional pipe for TCP sockets.

- Tags: internals
- Published: 2026-07-26

### [Default Relay Server Addresses for croc: IPv4, IPv6, and Configuration Guide](/schollz/croc/what-are-the-default-relay-server-addresses-for-croc)

Discover default croc relay server addresses for IPv4 and IPv6. Learn how croc uses croc.schollz.com and croc6.schollz.com and how to configure them.

- Tags: how-to-guide
- Published: 2026-07-26

### [How croc Implements Password-Authenticated Key Agreement (PAKE)](/schollz/croc/how-does-croc-implement-password-authenticated-key-agreement)

Learn how croc implements Password-Authenticated Key Agreement PAKE securely deriving a session key from a code phrase without transmitting the password. Discover secure key exchange.

- Tags: deep-dive
- Published: 2026-07-26

### [What Cryptographic Protocols Does Croc Use for Security?](/schollz/croc/what-cryptographic-protocols-does-croc-use-for-security)

Discover the cryptographic protocols Croc uses for secure file transfers Learn about key derivation encryption and integrity verification methods like PBKDF2 AES and SHA256

- Tags: security
- Published: 2026-07-26

### [Core Architecture of the croc Project: Secure P2P File Transfer in Go](/schollz/croc/what-is-the-core-architecture-of-the-croc-project)

Explore the core architecture of the croc project, featuring a monolithic Client struct for secure P2P file transfer in Go using PAKE, relays, and AES-GCM encryption for CLI and library use.

- Tags: architecture
- Published: 2026-07-26

### [How Croc Handles Secure File Transfers Without Port Forwarding: Relay Architecture Explained](/schollz/croc/how-does-croc-handle-secure-file-transfers-without-port-forwarding)

Discover how croc bypasses port forwarding for secure file transfers using a relay architecture with PAKE and AES-GCM encryption for robust end-to-end security.

- Tags: architecture
- Published: 2026-07-26

### [Croc's Password Relay Authentication Mechanism Using the --pass Flag](/schollz/croc/crocs-password-relay-authentication-mechanism)

Learn how Croc's password relay authentication ensures secure transfers. Discover how the --pass flag validates custom passwords during the TCP handshake for authenticated access.

- Tags: deep-dive
- Published: 2026-07-26

### [How to Debug croc Issues with the --debug Flag and Logs](/schollz/croc/how-to-debug-croc-issues-with-debug-flag-and-logs)

Debug croc issues effectively using the --debug flag to reveal detailed diagnostic messages during connection handshakes, encryption, and packet transfers. Troubleshoot faster with enhanced logging.

- Tags: how-to-guide
- Published: 2026-07-26

### [Understanding Croc's TCP Buffer Size and Transfer Chunking](/schollz/croc/understanding-crocs-tcp-buffer-size-and-transfer-chunking)

Unlock efficient data transfers with Croc. Learn how its fixed 64 KB TCP buffer size and uniform chunking optimize memory and throughput.

- Tags: internals
- Published: 2026-07-26

### [How Croc Integrates the Browser WebAssembly Client: Architecture and Implementation](/schollz/croc/how-does-croc-integrate-with-the-browser-webassembly-client)

Discover how Croc integrates its WebAssembly client by compiling Go to Wasm for browsers. Learn about its WebRTC peer-to-peer transport and WebSocket signaling.

- Tags: architecture
- Published: 2026-07-26

### [Building a Custom croc Relay with Allowed Port Ranges: A Complete Guide](/schollz/croc/building-a-custom-croc-relay-with-allowed-port-ranges)

Learn to build a custom croc relay with allowed port ranges using the schollz/croc repository. Secure your file transfers by restricting TCP ports for authorized WebSocket connections.

- Tags: how-to-guide
- Published: 2026-07-26

### [How Croc Handles File Renaming to Avoid Overwrite Prompts](/schollz/croc/how-does-croc-handle-file-renaming-to-avoid-overwrite-prompts)

Learn how Croc uses the --rename flag to automatically rename files and prevent overwrite prompts during transfers for a seamless experience.

- Tags: internals
- Published: 2026-07-26

### [Croc's Relay Communication Protocol Internals: How the PAKE Handshake and Room-Based Pairing Work](/schollz/croc/crocs-relay-communication-protocol-internals)

Explore Croc's relay communication protocol internals. Learn how PAKE handshake and room based pairing create secure connections without inspecting payloads.

- Tags: internals
- Published: 2026-07-26

### [How to Exclude Specific Files During Folder Transfer with `--exclude` in Croc](/schollz/croc/how-to-exclude-specific-files-during-folder-transfer)

Easily exclude files from folder transfers with croc. Learn how to use --exclude for pattern matching and --exclude-file for precise path exclusion during your data transfers.

- Tags: how-to-guide
- Published: 2026-07-26

### [Understanding croc's Internal DNS Resolver: How the `--internal-dns` Flag Works](/schollz/croc/understanding-crocs-internal-dns-resolver)

Learn how croc's internal DNS resolver works with the --internal-dns flag. Bypass system DNS and query public servers directly for faster connections.

- Tags: internals
- Published: 2026-07-26

### [How Croc Multiplexes Multiple Transfers Over a Single Connection](/schollz/croc/how-does-croc-multiplex-multiple-transfers-over-single-connection)

Learn how Croc multiplexes multiple file transfers over one encrypted TCP connection using message identifiers. Discover efficient concurrent data sharing.

- Tags: internals
- Published: 2026-07-26

### [Croc's --classic Mode: Security Implications and Usage Guide](/schollz/croc/crocs-classic-mode-security-implications-and-usage)

Explore Croc's classic mode security risks discover how the --classic flag exposes shared secrets on Unix systems understand usage implications and secure your transfers.

- Tags: deep-dive
- Published: 2026-07-26

### [How to Throttle Upload Speed in Croc Transfers](/schollz/croc/how-to-throttle-upload-speed-in-croc-transfers)

Learn to throttle upload speed in croc transfers using the --throttleUpload flag. Control bandwidth easily with human-readable units like 500k or 2M for efficient file transfers.

- Tags: how-to-guide
- Published: 2026-07-26

### [How to Use the `--curve` Flag to Select Different Encryption Curves in croc](/schollz/croc/using-curve-flag-to-select-different-encryption-curves)

Master the croc --curve flag to select PAKE encryption curves like p256, p384, p521, and x25519. Optimize security and performance for your file transfers.

- Tags: how-to-guide
- Published: 2026-07-26

### [How Croc's Code Phrase PAKE Authentication Works](/schollz/croc/how-does-crocs-code-phrase-pake-authentication-work)

Discover how Croc's PAKE authentication transforms your code phrase into a secure session key. Learn how this method protects your data without sending passwords over the network.

- Tags: internals
- Published: 2026-07-26

### [Managing Croc Configuration Persistence with the `--remember` Flag](/schollz/croc/managing-croc-configuration-persistence-with-remember-flag)

Learn how to manage croc configuration persistence using the --remember flag. Save command-line settings to a JSON file for automatic reloading on future croc transfers.

- Tags: how-to-guide
- Published: 2026-07-26

### [How to Serve Croc's Web Client with a Custom Upstream Relay](/schollz/croc/how-to-serve-crocs-web-client-with-a-custom-upstream-relay)

Learn how to serve Croc's web client with a custom upstream relay. Configure RelayHost, RelayPassword, and AllowedPorts for a secure and personalized experience.

- Tags: how-to-guide
- Published: 2026-07-26

### [Croc's IPv6-First Architecture and IPv4 Fallback Mechanism: A Deep Dive into Dual-Stack Networking](/schollz/croc/crocs-ipv6-first-architecture-and-ipv4-fallback-mechanism)

Explore Croc's IPv6-first architecture and dual-stack networking. Learn how it prioritizes IPv6 and falls back to IPv4 for seamless peer connections.

- Tags: deep-dive
- Published: 2026-07-26

### [How to Use Custom Hash Algorithms (xxhash, imohash, md5, highway) in croc](/schollz/croc/how-to-use-custom-hash-algorithms-in-croc)

Learn to use custom hash algorithms like xxhash, imohash, md5, and highway in croc. Easily switch hashing with the --hash flag for secure file transfers.

- Tags: how-to-guide
- Published: 2026-07-26

### [Understanding Croc's Compression Algorithm and When to Disable It](/schollz/croc/understanding-crocs-compression-algorithm-and-when-to-disable-it)

Explore Croc's DEFLATE compression algorithm and learn when to disable it with --no-compress for faster transfers of already compressed files or low-latency networks.

- Tags: deep-dive
- Published: 2026-07-26

### [How Croc's Multicast Local Discovery Works](/schollz/croc/how-does-crocs-multicast-local-discovery-work)

Discover how Croc's multicast local discovery enables direct peer-to-peer connections on your LAN. Learn about broadcast packets, public keys, and token transfers without relays.

- Tags: internals
- Published: 2026-07-26

### [How to Configure croc to Use SOCKS5 or HTTP Proxy for File Transfers](/schollz/croc/configuring-croc-to-use-socks5-or-http-proxy-for-transfers)

Learn how to configure croc to use SOCKS5 or HTTP proxy for secure file transfers. Utilize the --socks5 and --connect flags for seamless proxy integration.

- Tags: how-to-guide
- Published: 2026-07-26

### [How Croc Handles File Transfer Resume After Interruption](/schollz/croc/how-does-croc-handle-file-transfer-resume-after-interruption)

Discover how croc ensures robust file transfer resume after interruptions. Learn about its receiver-side detection, hash verification, and efficient chunk requesting for seamless transfers.

- Tags: internals
- Published: 2026-07-26

### [How to Run a Private Croc Relay Server with Custom Ports](/schollz/croc/how-to-run-a-private-croc-relay-server-with-custom-ports)

Easily run a private croc relay server with custom ports. Secure your file transfers with a password-protected TCP relay on your chosen ports. Learn how to set it up quickly.

- Tags: how-to-guide
- Published: 2026-07-26

### [How Croc's PAKE End-to-End Encryption Works Internally](/schollz/croc/how-does-crocs-pake-end-to-end-encryption-work-internally)

Learn how Croc's PAKE end-to-end encryption transforms a simple code into a strong session key for secure file transfers using AES-GCM.

- Tags: internals
- Published: 2026-07-26

### [How to Throttle Upload Speed in croc Using the --throttleUpload Flag](/schollz/croc/how-to-throttle-upload-speed-using-throttleupload-flag)

Limit croc upload speed using the --throttleUpload flag. Easily control bandwidth for file transfers with simple commands.

- Tags: how-to-guide
- Published: 2026-07-23

### [How Code Phrase Establishment and PAKE Handshake Work in croc](/schollz/croc/how-code-phrase-establishment-and-pake-handshake-work)

Learn how croc uses code phrase establishment and a PAKE handshake to secure file transfers with Argon2 and TCP authentication before data transmission.

- Tags: internals
- Published: 2026-07-23

### [How croc's End-to-End Encryption Works with PAKE: A Deep Dive into the Handshake](/schollz/croc/how-crocs-end-to-end-encryption-works-with-pake)

Discover how croc uses PAKE for secure file transfers. Learn how a simple code becomes a strong encryption key via AES-GCM for protected data exchange.

- Tags: deep-dive
- Published: 2026-07-23

### [What Are croc's Default Relay Ports and How Does Multiplexing Help](/schollz/croc/croc-default-relay-ports-multiplexing-benefits)

Discover croc's default relay ports 9009-9013 and how multiplexing enables faster, more resilient file transfers using multiple parallel TCP streams.

- Tags: deep-dive
- Published: 2026-07-23

### [How croc Handles Symlinks and File Permissions in Secure File Transfers](/schollz/croc/how-croc-handles-symlinks-file-permissions)

Learn how croc secures file transfers by preserving symlinks and file permissions. It hashes symlink targets and restores original permissions using os.Chmod.

- Tags: internals
- Published: 2026-07-23

### [How to Exclude Files and Folders with croc: A Complete Guide](/schollz/croc/how-to-exclude-files-folders-croc)

Learn to exclude files and folders with croc using the exclude flag for patterns or exclude file for exact paths. Filter unwanted data efficiently.

- Tags: how-to-guide
- Published: 2026-07-23

### [Understanding the Croc Classic Mode Vulnerability (CVE-2023-43621)](/schollz/croc/croc-classic-mode-vulnerability-cve-2023-43621)

Learn about the croc classic mode vulnerability CVE-2023-43621. Discover how to protect your data from unwanted local access by understanding this security flaw.

- Tags: security
- Published: 2026-07-23

### [How to Use a SOCKS5 Proxy with croc for Tor: Complete Guide](/schollz/croc/how-to-use-socks5-proxy-croc-tor)

Learn to use a SOCKS5 proxy with croc for enhanced anonymity on the Tor network. Securely transfer files with this complete guide.

- Tags: how-to-guide
- Published: 2026-07-23

### [Which Hash Algorithms Does Croc Support and When to Use Each One](/schollz/croc/croc-supported-hash-algorithms-usage)

Discover the hash algorithms supported by Croc: MD5, XXHash, IMOHash, and HighwayHash. Learn when to use each for optimal speed, security, and collision resistance.

- Tags: deep-dive
- Published: 2026-07-23

### [How Croc Handles Transfer Interruptions and Reconnections](/schollz/croc/how-croc-handles-transfer-interruptions-and-reconnections)

Learn how croc automatically handles transfer interruptions and reconnections. It retries failed transfers with exponential backoff and resumes only missing file chunks.

- Tags: internals
- Published: 2026-07-23

### [How croc's TCP Relay Manages Rooms and Connections](/schollz/croc/how-crocs-tcp-relay-manages-rooms-and-connections)

Discover how croc's TCP relay manages rooms and connections. It uses synchronized maps and background goroutines for secure, authenticated data transfer and automatic session expiry.

- Tags: internals
- Published: 2026-07-23

### [How Croc's PAKE Encryption Works: Secure Key Exchange in File Transfers](/schollz/croc/how-crocs-pake-encryption-works)

Discover how Crocs PAKE encryption secures file transfers by converting a code into a strong session key for an AES-GCM channel before data transmission.

- Tags: deep-dive
- Published: 2026-07-23

