@Test @Ignore public void testConnectProxyHttps() throws Throwable { final Host host = new Host(new DAVSSLProtocol(), "svn.cyberduck.io"); final AtomicBoolean verified = new AtomicBoolean(); final DAVSession session = new DAVSession(host, new DefaultX509TrustManager() { @Override public void verify(final String hostname, final X509Certificate[] certs, final String cipher) throws CertificateException { assertNotNull(hostname); verified.set(true); super.verify(hostname, certs, cipher); } }, new KeychainX509KeyManager(new DisabledCertificateIdentityCallback(), host, new DisabledCertificateStore())) { }; final LoginConnectionService c = new LoginConnectionService( new DisabledLoginCallback() { @Override public Credentials prompt(final Host bookmark, final String username, final String title, final String reason, final LoginOptions options) { return new Credentials("test", "test"); } }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener(), new ProxyFinder() { @Override public Proxy find(final Host target) { return new Proxy(Proxy.Type.HTTPS, "localhost", 8080); } } ); try { Executors.newSingleThreadExecutor().submit(new Callable<Void>() { @Override public Void call() throws Exception { c.connect(session, PathCache.empty(), new DisabledCancelCallback()); return null; } }).get(); } catch(ExecutionException e) { throw e.getCause(); } finally { assertTrue(verified.get()); session.close(); } }
@Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key);  DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key, final RedirectCallback redirect); }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key);  DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key, final RedirectCallback redirect); @Override DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override boolean alert(final ConnectionCallback callback); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type); }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key);  DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key, final RedirectCallback redirect); @Override DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override boolean alert(final ConnectionCallback callback); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type);  }