A lightweight, Docker-based DNS tunnel and Shadowsocks stack using iodine and shadowsocks-libev with v2ray-plugin.
Built for use in restricted environments where only DNS is allowed, this setup exposes a local SOCKS5 proxy via an encrypted DNS tunnel.
- π Encrypted SOCKS5 proxy tunneled entirely through DNS
- π§ Alpine-based images for minimal footprint
- π³ Docker Compose deployment
- βοΈ Environment-configurable client and server setup
- π Works behind restrictive firewalls (DNS-only egress)
.
βββ client/
β βββ .env # Client environment (tunnel + proxy settings)
β βββ docker-compose.yml # Starts iodine + ss-local
β βββ Dockerfile.iodine # Builds iodine tunnel client
β βββ start-iodine.sh # Entrypoint for iodine client
β βββ start-ss-client.sh # Entrypoint for Shadowsocks + v2ray-plugin
β
βββ server/
β βββ .env # Server configuration
β βββ docker-compose.yml # Starts iodined + ss-server
β βββ Dockerfile # Builds iodine server
β βββ iodined.sh # Entrypoint for DNS tunnel server
β
βββ README.md
cd server
cp .env.example .env # edit .env
docker-compose up -d --buildMake sure to delegate a subdomain (e.g. t1.example.com) to the server IP via an NS record.
cd client
cp .env.example .env # edit .env
docker-compose up -d --buildThis will:
- Connect to the iodine tunnel
- Start a SOCKS5 proxy at
localhost:1080
Test:
curl --socks5-hostname 127.0.0.1:1080 https://ifconfig.meEdit .env in both client/ and server/:
| Variable | Example | Purpose |
|---|---|---|
TUNNEL_DOMAIN |
t1.example.com |
Subdomain delegated to iodined |
TUNNEL_GATEWAY |
10.0.0.1 |
Tunnel IP of the server |
| Variable | Example |
|---|---|
IODINED_PASS |
SuperSecret123 |
| Variable | Example |
|---|---|
SS_REMOTE_PORT |
8388 |
SS_PASSWORD |
MyProxyPass |
SS_METHOD |
chacha20-ietf-poly1305 |
SOCKS_PORT |
1080 |
- You'll need to forward an NS record for the tunnel domain to your server.
- The TUN device must be available on the host (
/dev/net/tun) and Docker must be run with--cap-add=NET_ADMIN. - Shadowsocks traffic is obfuscated with
v2ray-plugin(can add TLS/websocket if needed).
MIT β Free to use, fork, and extend.
Enjoy stealth networking π΅οΈββοΈ over DNS.