How yarrick/iodine works
iodine tunnels IPv4 packets through DNS between a client and iodined server. The main workflow is client setup/authentication and negotiation, packet transfer over DNS-encoded queries and replies, then delivery through each endpoint’s virtual TUN interface. README also documents raw-UDP fallback and query/fragment tuning. The excerpts show endpoint orchestration and parts of the protocol, but not all server/client internals; uncertain relationships are omitted or dashed.
Main entry points: client.c Client transfer · iodine.c Client setup · iodined.c Server transfer · encoding.c Hostname encoding
Components 22
Tunnel endpoints
- Client setup
src/iodine.c - Client transfer
src/client.c - Server transfer
src/iodined.c
DNS tunnel protocol
- DNS codec
src/dns.c - Hostname encoding
src/encoding.c - Base32
src/base32.c - Base64
src/base64.c - Base128
src/base128.c - Authentication
src/login.c - MD5
src/md5.c - User sessions
src/user.c - Raw-mode probe
src/fw_query.c
Network platform
- DNS sockets
src/common.c - TUN interface
src/tun_unix.c - Windows TUN
src/tun_windows.c - Privilege handling
src/run_as.c - Process control
src/process.c
Protocol support
- OS compatibility
src/compat.c - Packet utilities
src/read.c
Other components
- Tunnel user
- Relay DNS
- IPv4 network
Connections 25
- Tunnel user → Client setup: configures
README.md - Client setup → Client transfer: starts handshake
src/iodine.c - Client setup → TUN interface: opens tunnel
src/iodine.c - Client setup → DNS sockets: opens DNS
- Client setup → Privilege handling: drops privileges
- Client setup → Process control: controls process
- Client transfer → Relay DNS: sends queries
README.md - Relay DNS → Server transfer: routes queries
README.md - Client transfer → DNS codec: uses DNS packets
- Server transfer → DNS codec: encodes replies
- Client transfer → Hostname encoding: encodes data
src/client.c - Hostname encoding → Base32: uses codec
- Hostname encoding → Base64: uses codec
- Hostname encoding → Base128: uses codec
- Client setup → Authentication: sets password
- Authentication → MD5: uses digest
src/login.c - Server transfer → User sessions: tracks sessions
src/iodined.c - Client transfer → Raw-mode probe: tests raw mode
- Client transfer → TUN interface: reads and writes
- Server transfer → TUN interface: reads and writes
- TUN interface → IPv4 network: transfers IPv4
README.md - Windows TUN → IPv4 network: transfers IPv4
- Client transfer → Relay DNS: raw UDP fallback
README.md - Server transfer → DNS sockets: listens for DNS
README.md - Client transfer → Packet utilities: uses packet helpers