0xERR0R / blocky

Fast and lightweight DNS proxy as ad-blocker for local network with many features
https://0xERR0R.github.io/blocky/
Apache License 2.0
4.79k stars 210 forks source link

Custom DNS local network config #1620

Open neumachen opened 1 month ago

neumachen commented 1 month ago

I'm wondering if it's possible to use Custom DNS with local IP and port. For example, I have a home server running in docker swarm, and I would like to map a domain to an IP address and it's port. How would you go on about that?

TheoTechnicguy commented 3 weeks ago

If I understood your question correctly, you would like to be able to do something like this:

Request: mypage.local
Answer: 172.24.0.4:8080

Is that correct?

If that is the case, then you are most likely searching for service records (SRV), which tell a client where exactly to find a service. It is specified by RFC2782, but the Wikipedia page should be more appropriate for your purposes.

There is a catch, however: clients must be SRV-aware and -supporting. If you are hoping to run two web pages over two different ports like 8080 and 8081, this will not work as most (or all, as far as I know) web browsers do not support SRV records.