Deprecate Socksaddr.IsFqdn: do not reject potentially valid domain names
This commit is contained in:
@@ -339,7 +339,7 @@ func (o DNSServerAddressOptions) Build() M.Socksaddr {
|
||||
}
|
||||
|
||||
func (o DNSServerAddressOptions) ServerIsDomain() bool {
|
||||
return M.IsDomainName(o.Server)
|
||||
return o.Build().IsDomain()
|
||||
}
|
||||
|
||||
func (o *DNSServerAddressOptions) TakeServerOptions() ServerOptions {
|
||||
|
||||
@@ -155,7 +155,7 @@ func (o ServerOptions) Build() M.Socksaddr {
|
||||
}
|
||||
|
||||
func (o ServerOptions) ServerIsDomain() bool {
|
||||
return M.IsDomainName(o.Server)
|
||||
return o.Build().IsDomain()
|
||||
}
|
||||
|
||||
func (o *ServerOptions) TakeServerOptions() ServerOptions {
|
||||
|
||||
@@ -61,7 +61,7 @@ func (d DERPVerifyClientURLOptions) ServerIsDomain() bool {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return M.IsDomainName(verifyURL.Host)
|
||||
return M.ParseSocksaddr(verifyURL.Hostname()).IsDomain()
|
||||
}
|
||||
|
||||
func (d DERPVerifyClientURLOptions) MarshalJSON() ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user