Hi,

I was using Jsch 0.1.39 to do file transfer with a SFTP server via a proxy.
It worked well for me in case of HTTP and SOCKS5 proxies.
In case of SOCKS4 proxy, it didn't work at all.
I looked into the class ProxySOCKS4 and saw the following code in method 
connect(...):

      int len=6;
      int s=0;
      while(s<len){
        int i=in.read(buf, s, len-s);
        if(i<=0){
          throw new JSchException("ProxySOCKS4: stream is closed");
        }
        s+=i;
      }

I thought the total byte length should be 8, so I changed int len=6; to int 
len=8; and then the SOCKS4 proxy worked for me.

Atsuhiko, is this a bug?

Regards,
Victor



      
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to