mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-03 18:04:40 +01:00
plugin_forward: silently skip '*.' prefixes
This commit is contained in:
parent
8f2be59a82
commit
eb2c1dc6b3
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,12 @@ func (plugin *PluginForward) Init(proxy *Proxy) error {
|
|||
continue
|
||||
}
|
||||
domain, serversStr, ok := StringTwoFields(line)
|
||||
if strings.HasPrefix(domain, "*.") {
|
||||
domain = domain[2:]
|
||||
}
|
||||
if strings.Index(domain, "*") != -1 {
|
||||
ok = false
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf(
|
||||
"Syntax error for a forwarding rule at line %d. Expected syntax: example.com 9.9.9.9,8.8.8.8",
|
||||
|
|
Loading…
Add table
Reference in a new issue