catch ( JSchException e )
{
throw new AuthenticationException( "Cannot connect. Reason: " + e.getMessage(), e );
}
Proxy proxy = null;
ProxyInfo proxyInfo = getProxyInfo( ProxyInfo.PROXY_SOCKS5, getRepository().getHost() );
if ( proxyInfo != null && proxyInfo.getHost() != null )
{
proxy = new ProxySOCKS5( proxyInfo.getHost(), proxyInfo.getPort() );
( (ProxySOCKS5) proxy ).setUserPasswd( proxyInfo.getUserName(), proxyInfo.getPassword() );