Skip to content

Commit 9f8bce2

Browse files
committed
Fix forwarding of subdomains
1 parent f35357e commit 9f8bce2

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

dnscrypt-proxy/forwarding-rules.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
## be set to that file name in the main configuration file.
1111

1212
example.com 9.9.9.9,8.8.8.8
13-

dnscrypt-proxy/plugin_forward.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
8484
if candidateLen > questionLen {
8585
continue
8686
}
87-
if question[questionLen-candidateLen:] == candidate.domain && (candidateLen == questionLen || (question[questionLen-candidateLen] == '.')) {
87+
if question[questionLen-candidateLen:] == candidate.domain && (candidateLen == questionLen || (question[questionLen-candidateLen-1] == '.')) {
8888
servers = candidate.servers
8989
break
9090
}

0 commit comments

Comments
 (0)