Xmrmix: Monero public-node RPC and transaction broadcast through the Nym mixnet (CLI + Python library + local gateway)

Mission: Build with Nym
GitHub: GitHub - apeirs/xmrmix: Talk to public Monero nodes and broadcast transactions through the Nym mixnet · GitHub (MIT)
Nyx address for rewards: n10c7h7wae558d5zejysktztheca6t3gc3vrnep9

What it does

xmrmix sends monerod RPC requests (get_info, get_fee_estimate, send_raw_transaction, …) to public Monero nodes through the Nym mixnet, so the node operator never sees them come from your IP address. It also runs a local monerod-compatible RPC gateway, so a wallet can use a public node over Nym without knowing anything about Nym.

xmrmix setup                       # starts nym-socks5-client on a random active exit gateway
xmrmix broadcast tx.hex            # sends the tx to 3 public nodes, each over its own mixnet stream
xmrmix info / fee / pool           # lookups, also over the mixnet
xmrmix gateway --port 18081        # monero-wallet-cli --daemon-address 127.0.0.1:18081 --untrusted-daemon
xmrmix ip                          # shows the IP servers see (the exit gateway's)

The problem it solves

A Monero wallet using a remote node tells that node, from your IP, which blocks you fetch and which transaction you broadcast first. A node operator who logs “this IP published transaction X first” can link your network identity to your wallet. Tor leaves timing correlation open; Nym’s mixing, delays and cover traffic fit this job.

One thing I had to solve: the exit policy

Nym exit gateways follow the Nym exit policy, which does not allow the usual monerod ports (18080, 18081, 18089). Pointing a SOCKS5 client at a node there fails with “connection not allowed by ruleset”. Many public nodes also answer on 443 behind TLS, which the policy allows. xmrmix reads the public node list (itself over the mixnet) and only picks nodes on exit-policy-compatible ports; xmrmix nodes lists them.

How it uses Nym (real mixnet traffic, not a mock)

  • Drives the official nym-socks5-client (v2026.19 release binary). xmrmix setup asks the Nym API for active exit gateways with a network requester that applies the exit policy, picks one at random, and turns on reply SURBs so the exit doesn’t learn the client’s mixnet address.
  • Each request is a new SOCKS5 stream through the entry gateway, three mix layers and the exit gateway’s network requester. TLS runs end to end with the node.
  • Hostnames are resolved with DNS-over-HTTPS over the mixnet, then connected by IPv4, so the local resolver never sees a node name.
  • No clearnet fallback: if the mixnet client is down, xmrmix refuses to send.
  • The transaction blob is sanity-checked offline first (wrong thing pasted, such as a txid, is caught before any packet leaves).

Proof it works (live mainnet mixnet, 2026-10-16; full logs in the repo’s examples/)

The servers see the exit gateway, not me. The exit was node 3182 and ipify reports 91.201.67.161, which is that node’s IP in the Nym API:

$ xmrmix ip -v
[   1.46s] send GET https://api.ipify.org -> socks5 127.0.0.1:1081 -> mixnet -> 172.67.74.152:443 (attempt 1)
[   6.75s] recv HTTP 200 OK from api.ipify.org in 5.29s (13 bytes)
https://api.ipify.org sees this request coming from 91.201.67.161 (a Nym exit gateway)

Node queries over the mixnet:

$ xmrmix info
https://xmr.0xrpc.io:443
height          3784856
difficulty      695383909866
tx_pool_size    12
synchronized    True

$ xmrmix fee
https://xmr-bhs.tari.com:443
fee per byte  20000 atomic units (quantization mask 10000)

send_raw_transaction over the mixnet. I used an already-confirmed transaction (30 confirmations), so no coins move; three independent nodes received it and answered that they did not relay it:

$ xmrmix broadcast examples/confirmed-tx.hex -v
tx v2, 4285 bytes, 5 input(s)
[   8.56s] recv HTTP 200 OK from node.chaoswg.dev in 1.85s (431 bytes)
[   8.96s] recv HTTP 200 Ok from xmr.visnova.pl in 1.92s (431 bytes)
[   9.38s] recv HTTP 200 OK from connect.xmr-node.org in 1.85s (431 bytes)
REJECTED  https://connect.xmr-node.org:443  5.77s  node did not relay it (already in the chain or pool, or refused)
REJECTED  https://xmr.visnova.pl:443  5.35s  ...
REJECTED  https://node.chaoswg.dev:443  4.94s  ...

The local gateway served json_rpc get_block_count, get_height and a binary endpoint (get_transaction_pool_hashes.bin, 1898 bytes) through the mixnet. 21 offline tests use in-process fakes of the SOCKS5 proxy and the node.

Current progress and what’s next

Working today: broadcast, node queries, the gateway. Not yet done: a test with a real wallet binary against the gateway, and a mode that spreads a wallet’s refresh across several exits. I’m also looking at Nym’s IP Packet Router so the gateway doesn’t depend on a network requester’s port policy. Feedback from node runners on which ports their exits actually allow is welcome.

1 Like