MoneroSwapper MoneroSwapper
Обучение

Monero и I2P: Как Протокол Невидимого Интернета Усиливает Приватность

MoneroSwapper Team · Mar 22, 2026 · 10 min read · 12 views

Why Network Privacy Matters for Monero

Monero's on-chain privacy features (ring signatures, stealth addresses, RingCT) protect the contents of transactions: who sent how much to whom. But these protections do not extend to the network layer. When your Monero wallet creates a transaction and broadcasts it to the peer-to-peer network, the initial broadcast originates from your IP address. An adversary operating nodes on the Monero network can observe which node first relayed a transaction and use this information to link transactions to IP addresses. This network-layer vulnerability is why Monero has invested significant effort in integrating anonymous overlay networks, particularly I2P (Invisible Internet Protocol).

Understanding I2P: The Invisible Internet Protocol

I2P is a fully encrypted, decentralized anonymous network layer designed for censorship-resistant communication. Unlike Tor, which is primarily designed for anonymous access to the regular internet (clearnet), I2P is optimized for internal network services (called "eepsites") and peer-to-peer communication. This distinction makes I2P particularly well-suited for cryptocurrency node communication, where the goal is not to access external websites anonymously but to communicate privately with other nodes on the same network.

Garlic Routing vs Onion Routing

I2P uses a technique called garlic routing, which is an evolution of the onion routing used by Tor. Understanding the differences is important for evaluating the privacy properties of each network:

Onion routing (Tor): In Tor, each message is wrapped in multiple layers of encryption, one for each relay in the circuit. As the message passes through each relay, one layer of encryption is removed (like peeling an onion), and the message is forwarded to the next relay. Tor uses bidirectional circuits: the same path is used for sending and receiving data. A typical Tor circuit has 3 relays (guard, middle, exit), and each message travels through the same circuit for the duration of the connection.

Garlic routing (I2P): I2P extends the onion routing concept in several important ways. First, I2P bundles multiple messages together into a single encrypted "garlic clove" before routing them. This makes traffic analysis harder because an observer cannot easily distinguish individual messages within the garlic bundle. Second, I2P uses unidirectional tunnels: the outbound path (from sender to recipient) is different from the inbound path (from recipient back to sender). This means that compromising a single tunnel reveals only half of the communication. Third, I2P tunnels are short-lived (typically 10 minutes) and constantly rotated, limiting the window for traffic analysis attacks.

Key I2P Concepts

Several I2P-specific concepts are relevant to understanding Monero's integration:

  • Destinations: An I2P destination is a cryptographic identity (essentially a public key pair) that represents an endpoint on the I2P network. Unlike IP addresses, destinations reveal nothing about the physical location or network identity of the host. Monero nodes on I2P are identified by their destinations.
  • Tunnels: Communication in I2P occurs through tunnels, which are chains of routers that relay encrypted messages. Each node builds its own inbound and outbound tunnels. Tunnels typically consist of 2-3 hops, with each hop adding a layer of encryption.
  • NetDB: The I2P network database (NetDB) is a distributed hash table that stores router information and lease sets (the current tunnels for a destination). Participation in the NetDB is how I2P achieves decentralization without central directory servers.
  • SAM (Simple Anonymous Messaging): The SAM protocol is an API that external applications use to communicate over I2P. Monero's monerod daemon uses the SAM bridge to send and receive messages through I2P without needing to implement I2P routing directly.

The Kovri Project: History and Legacy

Kovri was an ambitious project initiated by the Monero community in 2015 to create a C++ implementation of the I2P router specifically designed for integration with Monero. The project aimed to embed a full I2P router directly into monerod, so that every Monero node would automatically participate in the I2P network and route its traffic anonymously without any additional software or configuration.

Kovri's Technical Goals

Kovri set out to achieve several objectives:

  • Provide a lightweight, embeddable I2P router written in C++ (matching Monero's implementation language).
  • Eliminate the need for users to install and configure a separate I2P router (like the Java-based i2pd or the reference Java I2P implementation).
  • Ensure that all Monero network traffic, including transaction broadcasts, block propagation, and node discovery, occurs exclusively over I2P by default.
  • Contribute to the broader I2P network by adding Monero nodes as I2P routers, increasing the network's overall capacity and resilience.

Why Kovri Was Discontinued

Despite significant initial progress, Kovri was eventually shelved in favor of integrating with existing I2P router implementations. Several factors contributed to this decision:

  • Development complexity: Implementing a full I2P router from scratch in C++ proved to be an enormous undertaking. The I2P protocol specification is extensive, and maintaining compatibility with the evolving I2P network required continuous effort.
  • Existing mature implementations: The i2pd project (also written in C++) had matured significantly and provided a reliable, well-tested I2P router that could be used alongside monerod without embedding it directly.
  • Resource allocation: The Monero development community decided that the engineering resources spent on Kovri would be better directed toward core protocol improvements like Bulletproofs+ and FCMP++.
  • Practical equivalence: Using monerod's SAM bridge to connect to an external I2P router provides essentially the same privacy benefits as an embedded router, with the advantage of leveraging mature, audited I2P implementations.

Current I2P Support in Monerod

Modern versions of monerod include built-in support for I2P communication through the SAM protocol. This integration allows monerod to create I2P destinations, build tunnels, and communicate with other I2P-enabled Monero nodes without any custom patches or modifications.

How It Works

When I2P is enabled, monerod performs the following operations:

  • Destination creation: On first startup with I2P enabled, monerod creates a persistent I2P destination (key pair) that identifies it on the I2P network. This destination is stored locally and reused across restarts.
  • Tunnel building: Through the SAM bridge, monerod instructs the I2P router to build inbound and outbound tunnels. These tunnels are used for all peer communication.
  • Peer discovery: monerod discovers other I2P-enabled Monero nodes through seed nodes and peer exchange. It maintains a separate peer list for I2P connections, distinct from clearnet peers.
  • Transaction broadcast: When your wallet submits a transaction, monerod broadcasts it to peers through I2P tunnels. Because the tunnel hops use garlic encryption, observers on the I2P network cannot determine which node originated the transaction.
  • Block synchronization: New blocks are received and relayed through I2P tunnels, ensuring that your node's synchronization activity does not reveal its IP address.

Setup Guide: Running Monero Over I2P

Setting up Monero to run over I2P requires installing an I2P router and configuring monerod to use it. Here is a complete setup guide:

Step 1: Install i2pd

The i2pd (I2P Daemon) is the recommended I2P router for use with Monero due to its C++ implementation and lightweight resource footprint. Install i2pd from your distribution's package manager or build it from source. On Debian/Ubuntu-based systems, i2pd is available in the official repositories. On other systems, download the latest release from the i2pd project page.

Step 2: Configure i2pd for SAM

Ensure that the SAM bridge is enabled in the i2pd configuration. The SAM interface should be configured to listen on 127.0.0.1 port 7656, which is the default. The SAM bridge allows monerod to create and manage I2P sessions programmatically. Verify that SAM is enabled and the port is accessible.

Step 3: Configure monerod for I2P

Add I2P configuration to your monerod command line or configuration file. The key settings include enabling the anonymous inbound (tx-proxy setting for I2P using the SAM address 127.0.0.1:7656), setting the number of I2P outbound connections, and specifying known I2P seed nodes for initial peer discovery. For maximum privacy, you should also consider disabling clearnet connections entirely so that all traffic routes through I2P. However, this will limit your peer set to I2P-only nodes and may slow down block synchronization.

Step 4: Verify I2P Connectivity

After starting monerod with I2P configuration, check the logs for successful I2P session creation. You should see messages indicating that the I2P SAM session was established and that I2P peers are being discovered. Use the print_connections monerod command to verify that you have both clearnet and I2P peer connections (or I2P-only connections if you disabled clearnet).

Step 5: Configure Your Wallet

Your Monero wallet (CLI or GUI) connects to monerod via RPC. If monerod is running on the same machine, the wallet connection does not traverse the network and does not need I2P protection. However, if you run your wallet on a different machine than your node, the wallet-to-node RPC connection should also be protected, either through I2P, Tor, or an encrypted tunnel (e.g., SSH tunnel or WireGuard VPN).

I2P vs Tor for Monero: A Practical Comparison

Both I2P and Tor provide network-layer privacy for Monero, but they have different strengths:

  • Peer-to-peer optimization: I2P is designed for internal peer-to-peer communication, making it naturally suited for Monero node-to-node traffic. Tor is designed for client-server communication with exit nodes, which is not the model Monero uses.
  • Traffic analysis resistance: I2P's garlic routing, message bundling, and unidirectional tunnels provide stronger resistance to traffic analysis than Tor's bidirectional circuits for the specific use case of relaying transactions between nodes.
  • Network size and maturity: Tor has a significantly larger network (approximately 6,000-7,000 relays) compared to I2P (approximately 30,000-40,000 routers, but with lower individual bandwidth). Tor's larger network and longer track record mean it has been more extensively studied and battle-tested.
  • Latency: I2P generally has higher latency than Tor due to its longer tunnel paths and garlic routing overhead. For Monero, this latency is acceptable since transaction broadcasts and block propagation are not time-critical at the millisecond level.
  • Ease of setup: Tor is generally easier to set up with Monero, requiring only the Tor daemon and a simple proxy configuration. I2P requires the i2pd router and SAM bridge configuration, which is slightly more involved.
  • Dual-network operation: Monero supports running over both Tor and I2P simultaneously, using separate proxy configurations for each. This provides defense in depth: even if one overlay network is compromised, traffic through the other remains protected.

Advanced Configuration: Tor + I2P Dual Mode

For maximum network privacy, you can configure monerod to operate over both Tor and I2P simultaneously. In this configuration, monerod maintains separate peer lists for clearnet, Tor, and I2P connections, and routes traffic through the appropriate network based on the peer type. Configure the tx-proxy setting for both I2P (via SAM on port 7656) and Tor (via SOCKS on port 9050). With dual-mode, your transaction broadcasts are distributed across both overlay networks, making it even harder for an adversary to correlate your transactions with your identity, since they would need to compromise both Tor and I2P simultaneously.

Conclusion

Monero's integration of I2P represents a critical layer of defense against network-level surveillance. While on-chain privacy features protect what you transact, I2P protects the fact that you transacted at all from network observers. The combination of garlic routing, unidirectional tunnels, and native SAM integration in monerod makes I2P a practical and effective privacy enhancement for any Monero user who takes their operational security seriously. Whether you choose I2P, Tor, or both, running your Monero node over an anonymous network is one of the most impactful steps you can take to strengthen your financial privacy. For private cryptocurrency exchanges without network-level exposure, MoneroSwapper ensures your swap activity remains confidential.

Поделиться статьей

Похожие статьи

Готовы к обмену?

Анонимный Обмен Monero

Без KYC • Без регистрации • Мгновенный обмен

Обменять сейчас