You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the optional parameter rewrite you can replace domain part of the query with the defined part before the resolver lookup is performed. The query "printer.home" will be rewritten to "printer.lan" and return 192.168.178.3.
Actual Result
root@DS1215:~# dig example.com
; <<>> DiG 9.18.28-1~deb12u2-Debian <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4654
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 42 IN A 96.7.128.198
example.com. 42 IN A 96.7.128.175
example.com. 42 IN A 23.215.0.136
example.com. 42 IN A 23.215.0.138
example.com. 42 IN A 23.192.228.84
example.com. 42 IN A 23.192.228.80
;; Query time: 20 msec
;; SERVER: 100.80.0.0#53(100.80.0.0) (UDP)
;; WHEN: Sun Jan 26 23:35:14 CST 2025
;; MSG SIZE rcvd: 136
Log
[2025-01-26 23:35:14] TRACE new incoming request client_id= client_ip=100.80.0.0 client_request_id=4654 protocol=UDP question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03
[2025-01-26 23:35:14] TRACE query_logging.rewrite: go to inner resolver client_ip=100.80.0.0 client_names=100.80.0.0 question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 resolver=custom_dns
[2025-01-26 23:35:14] TRACE query_logging.rewrite.custom_dns: go to next resolver client_ip=100.80.0.0 client_names=100.80.0.0 next_resolver=noop question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03
[2025-01-26 23:35:14] TRACE query_logging.rewrite: go to next resolver client_ip=100.80.0.0 client_names=100.80.0.0 next_resolver=hosts_file question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03
[2025-01-26 23:35:14] TRACE query_logging.rewrite.blocking.caching: not in cache: go to next resolver client_ip=100.80.0.0 client_names=100.80.0.0 domain=example.com next_resolver=conditional_upstream question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03
[2025-01-26 23:35:14] TRACE query_logging.rewrite.blocking.caching.conditional_upstream: go to next resolver client_ip=100.80.0.0 client_names=100.80.0.0 next_resolver=special_use_domains question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best: delegating to resolver client_ip=100.80.0.0 client_names=100.80.0.0 question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 resolver=upstream 'https://dns.google/dns-query'
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best: delegating to resolver client_ip=100.80.0.0 client_names=100.80.0.0 question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 resolver=upstream 'https://cloudflare-dns.com/dns-query'
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best.upstream.bootstrap.caching: domain is cached client_ip=100.80.0.0 client_names=100.80.0.0 domain=cloudflare-dns.com question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 upstream=https://cloudflare-dns.com/dns-query
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best.upstream.bootstrap.caching: domain is cached client_ip=100.80.0.0 client_names=100.80.0.0 domain=cloudflare-dns.com question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 upstream=https://cloudflare-dns.com/dns-query
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best.upstream.bootstrap.caching: domain is cached client_ip=100.80.0.0 client_names=100.80.0.0 domain=dns.google question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 upstream=https://dns.google/dns-query
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best.upstream.bootstrap.caching: domain is cached client_ip=100.80.0.0 client_names=100.80.0.0 domain=dns.google question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 upstream=https://dns.google/dns-query
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best.upstream: received response from upstream answer=A (96.7.128.198), A (96.7.128.175), A (23.215.0.136), A (23.215.0.138), A (23.192.228.84), A (23.192.228.80) client_ip=100.80.0.0 client_names=100.80.0.0 net=https protocol=UDP question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 response_time_ms=15 return_code=NOERROR upstream=https://cloudflare-dns.com/dns-query upstream_ip=104.16.249.249
[2025-01-26 23:35:14] DEBUG query_logging.rewrite.blocking.caching.conditional_upstream.parallel_best: using response from resolver answer=A (96.7.128.198), A (96.7.128.175), A (23.215.0.136), A (23.215.0.138), A (23.192.228.84), A (23.192.228.80) client_ip=100.80.0.0 client_names=100.80.0.0 question=A (example.com.) req_id=754436ea-6728-466a-9983-6cab1029fd03 resolver=upstream 'https://cloudflare-dns.com/dns-query'
[2025-01-26 23:35:14] INFO queryLog: query resolved answer=A (96.7.128.198), A (96.7.128.175), A (23.215.0.136), A (23.215.0.138), A (23.192.228.84), A (23.192.228.80) client_ip=100.80.0.0 client_names=100.80.0.0 duration_ms=17 instance=blocky question_name=example.com. question_type=A response_code=NOERROR response_reason=RESOLVED (https://cloudflare-dns.com/dns-query) response_type=RESOLVED
Version
0.25
Config
Expected Result
From https://0xerr0r.github.io/blocky/latest/configuration/#custom-dns,
example.com
andexample-rewrite.com
should both return 1.2.3.4.Actual Result
Log
No rewrite message appears in the log.
blocky/resolver/rewriter_resolver.go
Line 145 in d6672f6
The text was updated successfully, but these errors were encountered: