mirror of https://github.com/cbeuw/Cloak
Fix incorrect addition of empty name in MockDomainList if the config string contains AlternativeNames=;
This commit is contained in:
parent
cfdff93a1c
commit
9d5c663618
|
|
@ -154,6 +154,15 @@ func (raw *RawConfig) ProcessRawConfig(worldState common.WorldState) (local Loca
|
||||||
return nullErr("ServerName")
|
return nullErr("ServerName")
|
||||||
}
|
}
|
||||||
auth.MockDomain = raw.ServerName
|
auth.MockDomain = raw.ServerName
|
||||||
|
|
||||||
|
var filteredAlternativeNames []string
|
||||||
|
for _, alternativeName := range raw.AlternativeNames {
|
||||||
|
if len(alternativeName) > 0 {
|
||||||
|
filteredAlternativeNames = append(filteredAlternativeNames, alternativeName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
raw.AlternativeNames = filteredAlternativeNames
|
||||||
|
|
||||||
local.MockDomainList = raw.AlternativeNames
|
local.MockDomainList = raw.AlternativeNames
|
||||||
local.MockDomainList = append(local.MockDomainList, auth.MockDomain)
|
local.MockDomainList = append(local.MockDomainList, auth.MockDomain)
|
||||||
if raw.ProxyMethod == "" {
|
if raw.ProxyMethod == "" {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue