{"id":13605152,"url":"https://github.com/jczic/MicroDNSSrv","last_synced_at":"2025-04-12T02:32:49.275Z","repository":{"id":121870777,"uuid":"93283136","full_name":"jczic/MicroDNSSrv","owner":"jczic","description":"A micro DNS server for MicroPython to simply respond to A queries on multi-domains with or without wildcards (used on Pycom modules \u0026 ESP32)","archived":false,"fork":false,"pushed_at":"2018-03-07T13:32:33.000Z","size":75,"stargazers_count":68,"open_issues_count":1,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-22T12:33:04.021Z","etag":null,"topics":["captive-portal","dns","dns-server","esp32","hc2","host","ip","lookup","lopy","micropython","nameserver","pycom","record","resolve","wildcard","wipy"],"latest_commit_sha":null,"homepage":"https://microdnssrv.hc2.fr","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/jczic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-06-04T01:25:12.000Z","updated_at":"2024-03-31T16:09:25.000Z","dependencies_parsed_at":"2024-01-07T21:53:03.427Z","dependency_job_id":null,"html_url":"https://github.com/jczic/MicroDNSSrv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jczic%2FMicroDNSSrv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jczic%2FMicroDNSSrv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jczic%2FMicroDNSSrv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jczic%2FMicroDNSSrv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jczic","download_url":"https://codeload.github.com/jczic/MicroDNSSrv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506933,"owners_count":21115510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["captive-portal","dns","dns-server","esp32","hc2","host","ip","lookup","lopy","micropython","nameserver","pycom","record","resolve","wildcard","wipy"],"created_at":"2024-08-01T19:00:55.229Z","updated_at":"2025-04-12T02:32:49.007Z","avatar_url":"https://github.com/jczic.png","language":"Python","funding_links":[],"categories":["Networking","Libraries"],"sub_categories":["Communications"],"readme":"## MicroDNSSrv is a micro DNS server for MicroPython to simply respond to A queries (principally used on ESP32 and [Pycom](http://www.pycom.io) modules)\n\n![HC²](hc2.png \"HC²\")\n\nVery easy to integrate and very light with one file only :\n- `\"microDNSSrv.py\"`\n\nSimple but effective :\n- Use it to embed a fast DNS server in yours modules\n- Simply responds to A queries (only)\n- Use a list of multiple domains\n- Include wildcards in the scheme of names\n- Use it to make a captive portal simply\n\n### Using *microDNSSrv* main class :\n\n| Name  | Function |\n| - | - |\n| Constructor | `mds = MicroDNSSrv()` |\n| Start DNS server | `mds.Start()` |\n| Stop DNS server | `mds.Stop()` |\n| Check if DNS server is running | `mds.IsStarted()` |\n| Set the domain names list | `mds.SetDomainsList(domainsList)` |\n\n### Basic example :\n```python\nfrom microDNSSrv import MicroDNSSrv\ndomainsList = {\n  \"test.com\"   : \"1.1.1.1\",\n  \"*test2.com\" : \"2.2.2.2\",\n  \"*google*\"   : \"192.168.4.1\",\n  \"*.toto.com\" : \"192.168.4.1\",\n  \"www.site.*\" : \"192.168.4.1\" }\nmds = MicroDNSSrv(domainsList)\nif mds.Start() :\n  print(\"MicroDNSSrv started.\")\nelse :\n  print(\"Error to starts MicroDNSSrv...\")\n```\n\n### Using *microDNSSrv* speedly creation of the class :\n```python\nfrom microDNSSrv import MicroDNSSrv\nif MicroDNSSrv.Create( {\n  \"test.com\"   : \"1.1.1.1\",\n  \"*test2.com\" : \"2.2.2.2\",\n  \"*google*\"   : \"192.168.4.1\",\n  \"*.toto.com\" : \"192.168.4.1\",\n  \"www.site.*\" : \"192.168.4.1\" } ) :\n  print(\"MicroDNSSrv started.\")\nelse :\n  print(\"Error to starts MicroDNSSrv...\")\n```\n\n### Using for a captive portal :\n```python\nMicroDNSSrv.Create({ '*' : '192.168.0.254' })\n```\n- Can be used with [MicroWebSrv](http://microwebsrv.hc2.fr) easily.\n\n\n\n### By JC`zic for [HC²](https://www.hc2.fr) ;')\n\n*Keep it simple, stupid* :+1:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjczic%2FMicroDNSSrv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjczic%2FMicroDNSSrv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjczic%2FMicroDNSSrv/lists"}