1 /* 2 * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the Eclipse Distribution License v. 1.0 which is available at 6 * https://www.eclipse.org/org/documents/edl-v10.php. 7 * 8 * SPDX-License-Identifier: BSD-3-Clause 9 */ 10 package org.eclipse.jgit.transport.sshd; 11 12 import java.net.InetSocketAddress; 13 14 /** 15 * Interface for obtaining {@link ProxyData} to connect through some proxy. 16 * 17 * @since 5.2 18 */ 19 public interface ProxyDataFactory { 20 21 /** 22 * Get the {@link ProxyData} to connect to a proxy. It should return a 23 * <em>new</em> {@link ProxyData} instance every time; if the returned 24 * {@link ProxyData} contains a password, the {@link SshdSession} will clear 25 * it once it is no longer needed. 26 * 27 * @param remoteAddress 28 * to connect to 29 * @return the {@link ProxyData} or {@code null} if a direct connection is 30 * to be made 31 */ 32 ProxyData get(InetSocketAddress remoteAddress); 33 }