diff --git a/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java b/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java index 57270174486..069aa028d46 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java @@ -24,6 +24,7 @@ import ch.cyberduck.binding.foundation.NSNotificationCenter; import ch.cyberduck.binding.foundation.NSObject; import ch.cyberduck.core.Host; +import ch.cyberduck.core.HostnameConfiguratorFactory; import ch.cyberduck.core.idna.PunycodeConverter; import org.apache.logging.log4j.LogManager; @@ -97,11 +98,11 @@ public boolean isReachable(final Host bookmark) { return false; } - protected static String toURL(final Host host) { - StringBuilder url = new StringBuilder(host.getProtocol().getScheme().toString()); + protected static String toURL(final Host bookmark) { + StringBuilder url = new StringBuilder(bookmark.getProtocol().getScheme().toString()); url.append("://"); - url.append(new PunycodeConverter().convert(host.getHostname())); - url.append(":").append(host.getPort()); + url.append(new PunycodeConverter().convert(HostnameConfiguratorFactory.get(bookmark.getProtocol()).getHostname(bookmark.getHostname()))); + url.append(":").append(bookmark.getPort()); return url.toString(); } diff --git a/core/src/main/java/ch/cyberduck/core/HostUrlProvider.java b/core/src/main/java/ch/cyberduck/core/HostUrlProvider.java index e32595b83dc..45129aa966f 100644 --- a/core/src/main/java/ch/cyberduck/core/HostUrlProvider.java +++ b/core/src/main/java/ch/cyberduck/core/HostUrlProvider.java @@ -56,7 +56,7 @@ public String get(final Host bookmark) { final Scheme scheme = bookmark.getProtocol().getScheme(); final int port = bookmark.getPort(); final String username = bookmark.getCredentials().getUsername(); - final String hostname = bookmark.getHostname(); + final String hostname = HostnameConfiguratorFactory.get(bookmark.getProtocol()).getHostname(bookmark.getHostname()); final String path = bookmark.getDefaultPath(); return this.get(scheme, port, username, hostname, path); } diff --git a/core/src/main/java/ch/cyberduck/core/diagnostics/DefaultInetAddressReachability.java b/core/src/main/java/ch/cyberduck/core/diagnostics/DefaultInetAddressReachability.java index 33f26d65b78..12780c8ab51 100644 --- a/core/src/main/java/ch/cyberduck/core/diagnostics/DefaultInetAddressReachability.java +++ b/core/src/main/java/ch/cyberduck/core/diagnostics/DefaultInetAddressReachability.java @@ -19,6 +19,7 @@ import ch.cyberduck.core.ConnectionTimeoutFactory; import ch.cyberduck.core.Host; +import ch.cyberduck.core.HostnameConfiguratorFactory; import java.io.IOException; import java.net.InetAddress; @@ -30,10 +31,10 @@ public class DefaultInetAddressReachability extends DisabledReachability { @Override - public boolean isReachable(final Host host) { + public boolean isReachable(final Host bookmark) { try { - return InetAddress.getByName(host.getHostname()).isReachable( - ConnectionTimeoutFactory.get(host).getTimeout() * 1000 + return InetAddress.getByName(HostnameConfiguratorFactory.get(bookmark.getProtocol()).getHostname(bookmark.getHostname())).isReachable( + ConnectionTimeoutFactory.get(bookmark).getTimeout() * 1000 ); } catch(IOException e) {