Allow FQDNs ending with a single '.' in our SOCKS host name checks.
Brought up as part of #16430 (moved). A single .
is allowed by RFC 3986 ("URI Generic Syntax") in URIs to specify that a domain name is absolute rather than relative. In practice not many sites use this, but right now since we unilaterally reject the syntax, it breaks things.
Relevant portion of RFC 3986:
Such a name consists of a sequence of domain labels separated by ".",
each domain label starting and ending with an alphanumeric character
and possibly also containing "-" characters. The rightmost domain
label of a fully qualified domain name in DNS may be followed by a
single "." and should be if it is necessary to distinguish between
the complete domain name and some local domain.
RFC 1928 specifies that all DOMAINNAME
type addresses are fully-qualified domain name
(s), so I personally think that the .
is redundant, but accepting it will increase compatibility, and being somewhat tolerant here is a good thing.