Skip to content

Commit

Permalink
Added SocketClient.connectVia(InputStream, OutputStream) method for P…
Browse files Browse the repository at this point in the history
…roxyCommand support (hierynomus#970)
  • Loading branch information
knoxg committed Dec 28, 2024
1 parent 31ed354 commit fcb336b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/net/schmizz/sshj/SocketClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ public void connectVia(Channel channel, String hostname, int port) throws IOExce
onConnect();
}

public void connectVia(InputStream input, OutputStream output) throws IOException {
this.hostname = null;
this.port = -1;
this.input = input;
this.output = output;
this.tunneled = true;
onConnect();
}


/** Connect to a remote address via a direct TCP/IP connection from the server. */
public void connectVia(DirectConnection directConnection) throws IOException {
connectVia(directConnection, directConnection.getRemoteHost(), directConnection.getRemotePort());
Expand Down

0 comments on commit fcb336b

Please sign in to comment.