@Override public ConnectFuture connect( String username, String host, int port, SocketAddress localAddress) throws IOException { HostConfigEntryResolver resolver = getHostConfigEntryResolver(); HostConfigEntry entry = resolver.resolveEffectiveHost(host, port, username); if (entry == null) { // generate a synthetic entry if (log.isDebugEnabled()) { log.debug("connect({}@{}:{}) no overrides", username, host, port); } // IPv6 addresses have a format which means they need special treatment, separate from pattern validation if (SshdSocketAddress.isIPv6Address(host)) { // Not using a pattern as the host name passed in was a valid IPv6 address entry = new HostConfigEntry("", host, port, username); } else { entry = new HostConfigEntry(host, host, port, username); } } else { if (log.isDebugEnabled()) { log.debug("connect({}@{}:{}) effective: {}", username, host, port, entry); } } return connect(entry, localAddress); }
@Override public ConnectFuture connect( String username, String host, int port, AttributeRepository context, SocketAddress localAddress) throws IOException { HostConfigEntryResolver resolver = getHostConfigEntryResolver(); HostConfigEntry entry = resolver.resolveEffectiveHost(host, port, localAddress, username, context); if (entry == null) { // generate a synthetic entry if (log.isDebugEnabled()) { log.debug("connect({}@{}:{}) no overrides", username, host, port); } // IPv6 addresses have a format which means they need special treatment, separate from pattern validation if (SshdSocketAddress.isIPv6Address(host)) { // Not using a pattern as the host name passed in was a valid IPv6 address entry = new HostConfigEntry("", host, port, username); } else { entry = new HostConfigEntry(host, host, port, username); } } else { if (log.isDebugEnabled()) { log.debug("connect({}@{}:{}) effective: {}", username, host, port, entry); } } return connect(entry, context, localAddress); }
curEntry = new HostConfigEntry(); curEntry.setHost(valsList); } else if (curEntry == null) { curEntry = new HostConfigEntry(); curEntry.setHost(Collections.singletonList(ALL_HOSTS_PATTERN)); globalEntry = curEntry;
curEntry = new HostConfigEntry(); curEntry.setHost(valsList); } else if (curEntry == null) { curEntry = new HostConfigEntry(); curEntry.setHost(Collections.singletonList(ALL_HOSTS_PATTERN)); globalEntry = curEntry;
HostConfigEntry normal = new HostConfigEntry(); normal.setHost(host); normal.setHostName(entry.resolveHostName(host));
HostConfigEntry normal = new HostConfigEntry(); normal.setHost(host); normal.setHostName(entry.resolveHostName(host));