Skip to content

Modern global DNS checker with FastAPI backend and React frontend. Test DNS queries from multiple servers worldwide with real-time performance analysis.

License

Notifications You must be signed in to change notification settings

Hardaistee/Basic-Dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Global DNS Checker

A modern and user-friendly global DNS query and analysis tool. Test your DNS queries from different global servers to perform performance and reliability analysis.

✨ Features

  • πŸ” Multiple DNS Server Support: Google, Cloudflare, OpenDNS, Quad9, AdGuard
  • πŸ“Š Performance Analysis: Measure response time of each server
  • 🎯 Multiple Record Types: A, AAAA, CNAME, MX, TXT, NS, SOA, PTR
  • 🌍 Global Testing: DNS queries from different geographical locations
  • πŸ“± Responsive Design: Mobile and desktop compatible
  • ⚑ Fast and Reliable: Parallel DNS queries

πŸ› οΈ Tech Stack

Backend

  • FastAPI - Modern Python web framework
  • dnspython - DNS query library
  • Uvicorn - ASGI server
  • Pydantic - Data validation

Frontend

  • React.js - Modern UI framework
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework
  • Axios - HTTP client
  • Lucide React - Modern icon set

πŸš€ Installation and Running

Requirements

  • Python 3.8+
  • Node.js 16+
  • npm or yarn

Backend Installation

# Go to backend directory
cd backend

# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate     # Windows

# Install dependencies
pip install -r requirements.txt

# Start server
uvicorn main:app --reload --host 0.0.0.0 --port 7050

Frontend Installation

# Go to frontend directory
cd frontend

# Install dependencies
npm install

# Start development server
npm start

The application will run at http://localhost:3000.

πŸ“‘ API Endpoints

GET /

Home page information

GET /health

Health check

GET /api/dns/servers

Lists available DNS servers

POST /api/dns/query

Performs DNS query

Request Body:

{
  "domain": "google.com",
  "record_type": "A",
  "dns_servers": ["google", "cloudflare"]
}

Response:

{
  "domain": "google.com",
  "record_type": "A",
  "results": [
    {
      "server": "8.8.8.8",
      "server_name": "google",
      "records": ["142.250.191.14"],
      "response_time": 45.2,
      "error": null
    }
  ],
  "timestamp": "2025-01-27 10:30:00 UTC"
}

🌐 Supported DNS Servers

Server IP Addresses Description
Google DNS 8.8.8.8, 8.8.4.4 Google's free DNS service
Cloudflare 1.1.1.1, 1.0.0.1 Fast and secure DNS
OpenDNS 208.67.222.222, 208.67.220.220 Cisco's DNS service
Quad9 9.9.9.9, 149.112.112.112 Security-focused DNS
AdGuard 94.140.14.14, 94.140.15.15 Ad-blocking DNS

πŸš€ Deployment

Backend (Railway/Render)

# For Railway
railway login
railway init
railway up

# For Render
# Create render.yaml file

Frontend (Vercel)

# With Vercel CLI
npm i -g vercel
vercel

# Or automatic deployment with GitHub

πŸ”§ Configuration

Backend Environment Variables

DEBUG=True
HOST=0.0.0.0
PORT=7050
ALLOWED_ORIGINS=http://localhost:3000
DNS_TIMEOUT=5
DNS_LIFETIME=10
MAX_WORKERS=10

Frontend Environment Variables

REACT_APP_API_URL=http://localhost:7050

πŸ“ Usage Examples

Basic DNS Query

curl -X POST "http://localhost:7050/api/dns/query" \
     -H "Content-Type: application/json" \
     -d '{
       "domain": "github.com",
       "record_type": "A"
     }'

Query from Specific Servers

curl -X POST "http://localhost:7050/api/dns/query" \
     -H "Content-Type: application/json" \
     -d '{
       "domain": "google.com",
       "record_type": "MX",
       "dns_servers": ["google", "cloudflare"]
     }'

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Create a Pull Request

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Contact

For questions about the project, you can open an issue or send a pull request.


⭐ If you liked this project, don't forget to give it a star!

About

Modern global DNS checker with FastAPI backend and React frontend. Test DNS queries from multiple servers worldwide with real-time performance analysis.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published