Solmix: Solana JSON-RPC through the Nym mixnet (local gateway + CLI)

Solmix: Solana JSON-RPC through the Nym mixnet (local gateway + CLI)
none 0.0 0

Mission: Build with Nym
GitHub: GitHub - kepler-ops-maker/solmix: Solana JSON-RPC through the Nym mixnet: local gateway + CLI (MIT) · GitHub (MIT)
Nyx address for rewards: n1pdm9qr8majtxsn7hmnlcse9840n5ecz9x4dyvl

What it does

solmix puts a Solana wallet’s RPC traffic on the Nym mixnet. One Python file (stdlib + PySocks), no accounts, no API keys:

solmix setup                  # random active exit gateway (perf >= 0.95), starts nym-socks5-client
solmix gateway                # local JSON-RPC at http://127.0.0.1:8899 -> mixnet -> public RPCs
solana --url http://127.0.0.1:8899 balance <addr>
solmix getBalance <addr>      # one-shot calls work too
solmix ip                     # shows the IP RPC providers see (a Nym exit)

Every Solana wallet, bot and CLI leaks “this IP asked about this address / sent this transaction” to its RPC provider. solmix breaks that link: the provider (and the ISP) sees a Nym exit gateway instead of the user’s IP.

How it works

  1. solmix setup queries the Nym API for exit gateways in the active set that run a network requester with the Nym exit policy, picks one at random (performance >= 0.95), and initialises Nym’s official nym-socks5-client release binary against it. Reply SURBs are on, so the exit does not learn the client’s mixnet address.
  2. Every JSON-RPC call opens a fresh SOCKS5 stream through the client: Sphinx packets, cover traffic, Poisson delays, entry gateway, 3 mix layers, exit gateway network requester.
  3. TLS stays end to end between solmix and the RPC provider (certificates checked against the real hostname). The exit sees host:port and ciphertext. DNS is resolved by the exit - the local resolver never sees which RPC provider is used.
  4. Failover across three independent public upstreams (api.mainnet-beta.solana.com, solana-rpc.publicnode.com, rpc.ankr.com); every attempt exits the mixnet. JSON-RPC batches pass through verbatim.

Verified working (2026-10-24)

  • solmix ip returned 217.118.194.67 (a Nym exit) while the host’s real IP was 136.70.35.86.
  • getHealth, getEpochInfo (epoch 1066), getBalance (real account, 2039280 lamports) and a two-call batch all succeeded through the gateway at ~3.5s per call.
  • Unit tests (test_solmix.py, mock RPC + fake socks5) pass 4/4 without the mixnet.

Current limits

  • Mixnet latency is seconds, not milliseconds - for wallet ops, bots and queries that shouldn’t be IP-linked, not latency-critical loops.
  • The nym-api topology query in setup goes direct (same as nym-socks5-client itself): it reveals Nym usage, nothing about the calls.
  • Tested against Solana mainnet-beta only so far.

Future development

Custom upstream lists (--upstream), per-request upstream pinning, WebSocket subscriptions over the mixnet (accountSubscribe/signatureSubscribe are the biggest IP leaks in Solana bots), and packaging (pipx). Happy to take direction from the team on what would be most useful.

2 Likes