This commit is contained in:
陈国伟 2021-07-29 15:19:07 +08:00
parent 44f23c2ed6
commit 54e57b3ab7

View File

@ -67,7 +67,7 @@ namespace FastGithub.Dns
} }
if (this.fastGithubConfig.IsMatch(record.Domain)) if (this.fastGithubConfig.IsMatch(record.Domain))
{ {
this.logger.LogError($"由于你的hosts文件设置了[{record.Domain}->{record.Address}]{nameof(FastGithub)}无法加速此域名"); this.logger.LogError($"由于你的hosts文件设置了{record}{nameof(FastGithub)}无法加速此域名");
} }
} }
} }
@ -94,6 +94,11 @@ namespace FastGithub.Dns
this.Address = address; this.Address = address;
} }
public override string ToString()
{
return $"[{this.Domain}->{this.Address}]";
}
public static bool TryParse(string record, [MaybeNullWhen(false)] out HostsRecord value) public static bool TryParse(string record, [MaybeNullWhen(false)] out HostsRecord value)
{ {
value = null; value = null;