mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-12-26 00:02:34 +01:00
Use net.ParseIP() to add missing port numbers
This commit is contained in:
parent
1b7b6418f1
commit
01d424a942
@ -31,7 +31,7 @@ type RegisteredServer struct {
|
||||
}
|
||||
|
||||
func NewServerStampFromLegacy(serverAddrStr string, serverPkStr string, providerName string) (ServerStamp, error) {
|
||||
if strings.Contains(serverAddrStr, "]") && !strings.Contains(serverAddrStr, ":") {
|
||||
if net.ParseIP(serverAddrStr) != nil {
|
||||
serverAddrStr = fmt.Sprintf("%s:d", serverAddrStr, DefaultPort)
|
||||
}
|
||||
return ServerStamp{
|
||||
|
Loading…
Reference in New Issue
Block a user