Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple wildcard support in upstream DNS syntax #3738

Open
emlimap opened this issue Oct 15, 2021 · 1 comment
Open

simple wildcard support in upstream DNS syntax #3738

emlimap opened this issue Oct 15, 2021 · 1 comment

Comments

@emlimap
Copy link

emlimap commented Oct 15, 2021

Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.

Problem Description

At present AdGuard supports specifying domains/subdomains and the upstream DNS server to use for those specific domains. This works great but gets a bit tricky if you want to match based on a post or prefix in a domain name without having to list individual domains.

Proposed Solution

Add support for wildcard character similar to the one in block list syntax.

For example,
*example.com would match superexample.com, 1example.com but not example.com
example.* would match any TLD

*-pre.example.com would match something-pre.example.com, another-pre.example.com, etc but not -pre.example.com

Alternatives Considered

Alternative is to use DNSMASQ which has support for *example.com matching.

Additional Information

DNSMASQ implementation

 Matching of domains is normally done on complete labels, so /google.com/ matches google.com and www.google.com but NOT supergoogle.com. This can be overridden with a * at the start of a pattern only: /*google.com/ will match google.com and www.google.com AND supergoogle.com. The non-wildcard form has priority, so if /google.com/ and /*google.com/ are both specified then google.com and www.google.com will match /google.com/ and /*google.com/ will only match supergoogle.com.

For historical reasons, the pattern /.google.com/ is equivalent to /google.com/ if you wish to match any subdomain of google.com but NOT google.com itself, use /*.google.com/ 

https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

@alexanderadam
Copy link

alexanderadam commented May 8, 2022

Would this issue only be for a single destination IP or also for a wildcard DNS services that resolves IPs dynamically (i.e. likexip.io, these services or hipio)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants