Troubleshooting the STH proxy

Diagnose bootstrap failures, connectivity errors, kill-switch side effects, QUIC stalls, and DNS resolution problems on XClient and the proxy-iroh server.

vpn_client exits during "Bootstrapping"

  • The relay hostname could not be resolved, or none of its addresses accepted a TCP connection on the relay port within the timeout.
  • Verify the host has working DNS before the VPN starts: dig +short smartholdem-block.duckdns.org and nc -zvw3 smartholdem-block.duckdns.org 3341 must both succeed.
  • The bootstrap phase never touches the tunnel. A failure here is upstream of the VPN and leaves the host untouched.

vpn_client exits during "Connecting" with "connectivity test failed"

  • The full SOCKS5 round-trip through the tunnel did not succeed within 15 seconds. Possible causes: server down, port policy refused 1.1.1.1:443, or a transport handshake failure.
  • Reproduce in SOCKS5 mode without installing any routing: ./client_tunnel, then curl -v --proxy socks5h://127.0.0.1:18080 https://1.1.1.1:443.
  • If the manual SOCKS5 test fails, the issue is on the tunnel or server side. The client refuses to install routing until it succeeds, so a failure leaves the host safe to retry.

vpn_client starts but no traffic passes

  • The most common cause is that CLIENT_SOCKET_ADDRESS_BIND is not the actual physical interface IP, or it changed after start.
  • Confirm the rule is being hit: ip rule | grep 'priority 90' should show the physical IP, and sudo ss -unp | grep iroh should show the socket bound to that IP, not 0.0.0.0.
  • If iroh is bound to 0.0.0.0, the source-address exemption never matches, the transport is routed into the tunnel, and the tunnel deadlocks.

Connection refused / REP=0x02 from the server

  • A SOCKS5 "connection not allowed by ruleset" reply from the server is deterministic. The destination was refused by either the port allowlist or the SSRF IP policy.
  • Port: the destination port is not in SOCKS5_ALLOWED_PORTS. The server operator must add it. There is no client-side workaround.
  • IP: the destination resolved to loopback, RFC 1918, link-local, CGNAT, or IPv6 ULA. This is intentional SSRF protection; there is no client-side workaround.

WebTransport or QUIC timeout

  • ERR_QUIC_PROTOCOL_ERROR on first navigation usually means a 1250-byte QUIC Initial packet exceeded Iroh's per-datagram limit before fragmentation.
  • Ensure both client and server run a version with MAX_CHUNK=900 fragmentation. If the error persists on first navigation only, check server logs for a watchdog firing on an idle WebTransport session.

DNS resolution fails while the VPN is up

  • DNS is tunnelled by default, so the resolver's own dial must succeed through the tunnel. On systemd-resolved hosts with DNS-over-TLS the dial to 1.1.1.1:853 must be allowed by the server.
  • Diagnose with resolvectl status (should show +DNSOverTLS) and sudo ss -tnp | grep ':853' (source should be 10.0.0.2, not the physical IP). Then dig +short smartholdem-block.duckdns.org.
  • Fix on the server: add 853 to SOCKS5_ALLOWED_PORTS and restart. If that is not possible, re-exempt systemd-resolve by UID on the client — accepting that DoT handshakes are then visible to the ISP.
  • Do not enable VPN_MANAGE_DNS=true. The current server has no DNS handler on 10.0.0.1:53; the default of false is correct for every deployment today.