Not send client info with non-Control D upstream by default

This commit is contained in:
Cuong Manh Le
2023-06-22 22:33:51 +07:00
committed by Cuong Manh Le
parent 12148ec231
commit 2f46d512c6
2 changed files with 57 additions and 5 deletions

View File

@@ -248,11 +248,8 @@ func (uc *UpstreamConfig) VerifyDomain() string {
// - Lan IP
// - Hostname
func (uc *UpstreamConfig) UpstreamSendClientInfo() bool {
if uc.SendClientInfo != nil && !(*uc.SendClientInfo) {
return false
}
if uc.SendClientInfo == nil {
return true
if uc.SendClientInfo != nil {
return *uc.SendClientInfo
}
switch uc.Type {
case ResolverTypeDOH, ResolverTypeDOH3: