Intelligent DNS Resolver for ESP8266/ESP32

DNS-Mixer is a smart DNS forwarding service that intelligently routes queries through multiple DNS providers to ensure reliability and bypass restrictions. Features real-time OLED display status and comprehensive failover mechanisms.

Key Features

🔄

Multi-Provider Failover

Cycles through 9+ DNS providers including Quad9, Cloudflare, Google DNS, and AdGuard. Automatically switches providers on failure with 50ms timeout for fast response.

📱

OLED Display Status

Real-time animated status display showing connection progress, DNS resolution status, provider information, and live statistics with smooth transitions.

📸 View demo image of OLED display in action

🛡️

Restriction Bypass

Intelligent provider selection and failover mechanisms help bypass DNS-based restrictions and censorship by routing through alternative providers.

Load Balancing

Randomized provider order distributes load across multiple DNS servers, preventing single-point failures and improving overall reliability.

🏠

Router Integration

Easy integration with home routers for network-wide DNS resolution. Configure once to protect all devices on your network automatically.

🔧

MicroPython Optimized

Specifically designed for ESP8266/ESP32 with minimal resource usage. Cross-compiled bytecode ensures optimal performance on microcontroller hardware.

How It Works

DNS Resolution Process

  1. Request Reception: Device receives DNS query from client
  2. Provider Selection: Randomly selects from 9+ DNS providers
  3. Query Forwarding: Forwards query with 50ms timeout
  4. Response Handling: Returns successful response to client
  5. Failover: Automatically tries next provider on failure
  6. Statistics Update: Updates OLED display with live stats

OLED Display Features

📊

Live Statistics

Real-time display of total requests, successes, and failures

🔄

Animated Status

Progress bars, spinners, and smooth transitions

📡

Provider Display

Shows current DNS provider being tested

Status Updates

Immediate feedback on connection and resolution status

Interactive Demonstration

DNS Resolution Demo

Experience how DNS-Mixer handles DNS queries with provider failover:

Click "Run Demo" to simulate DNS resolution with provider failover

OLED Display Simulator

See how the OLED display shows real-time status:

DNS-mixer Ready

Supported Hardware

ESP8266 Boards

Perfect for cost-effective DNS solutions:

  • NodeMCU ESP8266
  • Wemos D1 Mini
  • ESP-01 modules
  • Most ESP8266 development boards
Recommended for budget setups

ESP32 Boards

Enhanced performance and features:

  • ESP32 DevKitC
  • ESP32-WROOM-32
  • Lolin32 boards
  • All ESP32 variants
Better for complex applications

Requirements

Hardware

  • ESP8266 or ESP32 board
  • SSD1306 OLED display (128x64)
  • USB cable for programming
  • Power supply (3.3V)

Software

  • MicroPython firmware
  • Python 3.x for building
  • esptool for flashing
  • mpy-cross compiler

Network

  • WiFi access point
  • DHCP-capable router
  • Available IP address
  • Internet connectivity

Quick Start

1. Get the Code

git clone https://github.com/lily-osp/DNS-mixer.git cd dns-mixer

2. Install Dependencies

python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install mpy-cross esptool

3. Configure WiFi

# Edit code/main.py WIFI_SSID = "Your_WiFi_Name" WIFI_PASSWORD = "Your_WiFi_Password" STATIC_IP = "192.168.1.100"

4. Build and Flash

make build-esp8266 # or build-esp32 make PORT=/dev/ttyUSB0 flash

5. Configure Router

Set your router's DNS server to the DNS-Mixer's IP address (192.168.1.100)

6. Monitor OLED

Watch the OLED display for real-time status and statistics