{"id":34808750,"url":"https://github.com/b2un0/esphome-dns-rewrite-proxy","last_synced_at":"2026-05-23T08:01:34.994Z","repository":{"id":322294039,"uuid":"1088908089","full_name":"b2un0/esphome-dns-rewrite-proxy","owner":"b2un0","description":"use your esp32 as dns rewrite proxy","archived":false,"fork":false,"pushed_at":"2025-11-03T17:01:03.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T22:56:03.080Z","etag":null,"topics":["dns-proxy","dns-resolver","dns-rewrite","dns-server","esphome","esphome-component"],"latest_commit_sha":null,"homepage":"","language":"C++","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/b2un0.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-03T16:11:46.000Z","updated_at":"2025-11-03T18:38:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/b2un0/esphome-dns-rewrite-proxy","commit_stats":null,"previous_names":["b2un0/esphome-dns-rewrite-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/b2un0/esphome-dns-rewrite-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2un0%2Fesphome-dns-rewrite-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2un0%2Fesphome-dns-rewrite-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2un0%2Fesphome-dns-rewrite-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2un0%2Fesphome-dns-rewrite-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b2un0","download_url":"https://codeload.github.com/b2un0/esphome-dns-rewrite-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2un0%2Fesphome-dns-rewrite-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33387656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: 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":["dns-proxy","dns-resolver","dns-rewrite","dns-server","esphome","esphome-component"],"created_at":"2025-12-25T12:13:50.858Z","updated_at":"2026-05-23T08:01:34.951Z","avatar_url":"https://github.com/b2un0.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esphome DNS Rewrite Proxy\n\nThis ESPHome component acts as a DNS proxy that rewrites DNS queries based on user-defined rules.\n\nRecords not found in the rewrite rules are forwarded to the upstream DNS server from the current network configuration.\n\nTested on `ESP32-C3` and `ESP32-S3` devices. Support for `ESP8266` is not available due to memory constraints.\n\n## Konfiguration Example\n\n```yaml\n\nexternal_components:\n  - source: github://b2un0/esphome-dns-rewrite-proxy@main\n\ndns_proxy:\n  id: dns_server\n  records:\n    - domain: \"tc.fritz.box\"\n      ip: \"192.168.155.250\"\n    - domain: \"geo.hivebedrock.network\"\n      ip: \"192.168.155.15\"\n    - domain: \"play.inpvp.net\"\n      ip: \"192.168.155.15\"\n    - domain: \"mco.lbsg.net\"\n      ip: \"192.168.155.15\"\n    - domain: \"play.galaxite.net\"\n      ip: \"192.168.155.15\"\n    - domain: \"hivebedrock.network\"\n      ip: \"192.168.155.15\"\n    - domain: \"mco.cubecraft.net\"\n      ip: \"192.168.155.15\"\n    - domain: \"mco.mineplex.com\"\n      ip: \"192.168.155.15\"\n```\n\n## Sensors\n\n```yaml\nsensor:\n  - platform: template\n    name: \"DNS Query Count\"\n    id: query_count_sensor\n    accuracy_decimals: 0\n    state_class: \"total_increasing\"\n    icon: \"mdi:dns\"\n    lambda: |-\n      return id(dns_server).get_query_count();\n    update_interval: 10s\n\n  - platform: template\n    name: \"DNS Forwarded Count\"\n    id: forwarded_count_sensor\n    accuracy_decimals: 0\n    state_class: \"total_increasing\"\n    icon: \"mdi:dns-outline\"\n    lambda: |-\n      return id(dns_server).get_forwarded_count();\n    update_interval: 10s\n\n  - platform: template\n    name: \"DNS Records Count\"\n    id: record_count_sensor\n    accuracy_decimals: 0\n    state_class: \"measurement\"\n    icon: \"mdi:database\"\n    lambda: |-\n      return id(dns_server).get_record_count();\n    update_interval: 60s\n```\n\n## Test if rewrite works\n\nin case the esp device has the ip `192.168.155.51` and you have the `tc.fritz.box` domain rewritten, you can test it\nwith:\n\n```shell\nnslookup tc.fritz.box 192.168.155.51\n```\n\nthe answer should be something like:\n\n```plain\nServer:         192.168.155.51\nAddress:        192.168.155.51#53\n\nNon-authoritative answer:\nName:   tc.fritz.box\nAddress: 192.168.155.250\n\n```\n\nand in the esp log you should see something like:\n\n```plain\n[D][dns_redirect:171]: DNS query for: tc.fritz.box (ID: b6e8)\n[D][dns_redirect:187]: Local response: 192.168.155.250\n```\n\n## Test if forwarding works\n\nfor a domain that is not rewritten, e.g. `esphome.io`:\n\n```shell\nnslookup esphome.io 192.168.155.51\n```\n\nthe answer should be something like:\n\n```plain\nServer:         192.168.155.51\nAddress:        192.168.155.51#53\n\nNon-authoritative answer:\nName:   esphome.io\nAddress: 104.21.87.21\nName:   esphome.io\nAddress: 172.67.168.170\n```\n\nand in the esp log you should see something like:\n\n```plain\n[D][dns_redirect:171]: DNS query for: esphome.io (ID: c1fe)\n[D][dns_redirect:228]: Forwarded query (ID: c1fe -\u003e 9145)\n[D][dns_redirect:309]: Forwarded response (ID: 9145 -\u003e c1fe)\n```\n\n## Note\n\nIPv6 is not supported at the moment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb2un0%2Fesphome-dns-rewrite-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb2un0%2Fesphome-dns-rewrite-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb2un0%2Fesphome-dns-rewrite-proxy/lists"}