[ 
https://issues.apache.org/jira/browse/SSHD-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420510#comment-17420510
 ] 

Thomas Wolf commented on SSHD-791:
----------------------------------

There is no "code snippet", and no, nothing is included in the Apache MINA SSHD 
code base besides the basic ClientProxyConnector interface, which, as the 
original report points out, is not well suited to request-reply proxy protocols.

An implementation of what you ask for exists in JGit; see SSHD-1008. See my 
comment there, and take a look at the JGit code to understand how it does it, 
then adapt to your own needs. (One problem JGit never solved is the following: 
if it's unknown whether the proxy is a SOCKS4 or a SOCKS5 proxy, how could you 
dynamically choose the protocol? JGit only supports SOCKS5.)

> Support the socks protocol
> --------------------------
>
>                 Key: SSHD-791
>                 URL: https://issues.apache.org/jira/browse/SSHD-791
>             Project: MINA SSHD
>          Issue Type: New Feature
>            Reporter: Zhenliang Su
>            Priority: Minor
>              Labels: socks
>
> There is a situation for me to use SshClient to connect remote server via a 
> socks5 proxy server with Java code. I found the issue 
> https://issues.apache.org/jira/browse/SSHD-656 , and I want to implement 
> interface ClientProxyConnector to suit my issue, but I found it's impossible 
> because socks5 protocol is not as simple as just send a packet, but need to 
> send and receive multiple times.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to