{"id":34985809,"url":"https://github.com/mhaxanali/dns-resolver","last_synced_at":"2026-04-07T23:31:27.390Z","repository":{"id":326886605,"uuid":"1106400290","full_name":"mhaxanali/dns-resolver","owner":"mhaxanali","description":"A fast, multi-service DNS resolver with intelligent caching built with Go, Python, and vanilla JavaScript.","archived":false,"fork":false,"pushed_at":"2025-11-30T14:27:07.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-02T21:15:52.146Z","etag":null,"topics":["css","dns","go","golang","html","js","network","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhaxanali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-29T07:01:14.000Z","updated_at":"2025-11-30T14:27:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mhaxanali/dns-resolver","commit_stats":null,"previous_names":["mhaxanali/dns-resolver"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mhaxanali/dns-resolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaxanali%2Fdns-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaxanali%2Fdns-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaxanali%2Fdns-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaxanali%2Fdns-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhaxanali","download_url":"https://codeload.github.com/mhaxanali/dns-resolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhaxanali%2Fdns-resolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","dns","go","golang","html","js","network","python"],"created_at":"2025-12-27T01:33:01.464Z","updated_at":"2026-04-07T23:31:27.385Z","avatar_url":"https://github.com/mhaxanali.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DNS Resolver\n\nA fast, multi-service DNS resolver with intelligent caching and TTL-based cache expiration built with Go, Python, and vanilla JavaScript.\n\n## Features\n\n- **DNS Resolution:** Resolves domain names to IP addresses using Go's native `net` package\n- **Smart Caching with TTL:** Python Flask service with SQLite backend caches results with configurable time-to-live\n- **Cache Expiration:** Automatic cache invalidation after 1 day to ensure fresh results\n- **Clean UI:** Minimalist dark-themed frontend for easy domain resolution\n- **Multi-Service Architecture:** Go backend communicates with Python cache service\n\n## Tech Stack\n\n- **Backend API:** Go\n- **Cache Service:** Python (Flask + SQLite)\n- **Frontend:** HTML, CSS, JavaScript\n- **Build Scripts:** Bash/Batch\n\n## Architecture\n```\nFrontend (HTML/JS)\n    ↓\nGo Backend (port 8080)\n    ↓\nPython Cache Service (port 5050) + TTL validation\n    ↓\nSQLite Database\n```\n\n## Installation\n\n### Prerequisites\n- Go 1.20+\n- Python 3.10+\n\n### Build\n\n**Linux/Mac:**\n```bash\nchmod +x scripts/build.sh\n./scripts/build.sh\n```\n\n**Windows:**\n```bat\nscripts\\build.bat\n```\n\n## Usage\n\n**Linux/Mac:**\n```bash\n./scripts/run.sh\n```\n\n**Windows:**\n```bat\nscripts\\run.bat\n```\n\nThen open `frontend/index.html` in your browser and start resolving domains.\n\n## How It Works\n\n1. User enters domain in frontend\n2. Frontend calls Go API at `localhost:8080/lookup`\n3. Go checks Python cache service at `localhost:5050`\n4. Cache service validates TTL—if expired, returns cache miss\n5. On cache miss, Go performs DNS lookup and stores result with timestamp\n6. IP address returned to frontend and displayed\n\n## Cache Behavior\n\n- **TTL:** 1 hour (3600 seconds)\n- **Expired entries:** Treated as cache misses, triggering fresh DNS lookup\n- **Storage:** Domain, IP, and timestamp stored in SQLite\n\n## Project Structure\n```\ndns-resolver/\n├── backend/\n│   ├── api/           # Go backend\n│   ├── flask-server/  # Python cache service\n│   ├── log/           # Logging utilities\n│   \n├── resources/     # SQLite database\n├── frontend/          # HTML/CSS/JS\n└── scripts/           # Build and run scripts\n```\n\n## License\n\nMIT\n\n## Author\n\nMuhammad Hasan - [GitHub](https://github.com/mhaxanali)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhaxanali%2Fdns-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhaxanali%2Fdns-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhaxanali%2Fdns-resolver/lists"}