It seems that the problem is somewhere in lftp when using dante. I
tried:
socksify ftp
to connect the target ftp through the socks5 proxy and everything worked
okay. I can list and download files and the server log shows that I am
going through the proxy server.

Then I tried: 
socksify lftp 
to connect and got the error:
cd: Fatal error: control-socket: Transport endpoint is not connected

I tried to compile lftp with and without the --with-socksdante flag,
both of them giving the same aforementioned error. Could you please take
a look at the problem, Alex? If you need any debug output, please tell
me how to collect it and I will send it to you.

Thanks!



On Fri, 09 Jul 2004 11:47:49 -0700, "Alan Feng" <[EMAIL PROTECTED]>
said:
> 
> First, thank you Alexander for such a powerful/wonderful ftp client. I
> have been using it for more than a year now. Also thanks to update my
> mailing list membership :)
> 
> I have been trying different settings for more than 3 days and still no
> luck so far. I searched google, the lftp mailing list archive, and the
> NEC socks5 mailing list archive (which is pretty old, don't know if it
> is still been updated) but didn't find any solutions. Please help me out
> if you can, thank you!
> 
> Since I can not publish the proxy server address I try to use, I will
> use 123.123.123.123:8888 to represent it below.
> 
> My computer: Gentoo Linux kernel-2.4.25; gcc compiler: v3.3.3; lftp:
> v3.0.6
> 
> What I need: setup a socks5 client library so lftp can connect to
> certain site through a socks5 proxy. It will be a plus if I can still
> connect to some other ftp servers directly.
> 
> What I tried and the outcomes:
> 
> 1. NEC socks5 v1.0 r11 patch 3 (the latest version, I believe).
> 
> The source does not directly compile because its included telnet and ftp
> client tools are not comparible with the gcc 3.3.3. I removed the telnet
> and ftp from the make script and it is now compiling without errors. I
> also compiled lftp with "--with-socks5" flag and setup the
> "SOCKS5_SERVER=123.123.123.123:8888"
> 
> In lftp, I can login to the ftp server through proxy, but when I do a
> "ls", I receive a "connection refused" error (see debug output below).
> 
> I also tried to setup the /etc/libsocks5.conf file, which contains only
> one line:
> socks5 - - - - 123.123.123.123:8888
> It is giving the same error. 
> 
> Tried "runsocks lftp", it will not go through the proxy. 
> 
> Tried the included client tool "rping", got error:
> lsLibProtoExchg: Protocol exchange failed. 
> 
> The lftp debug output for "ls" command (real server IP address masked):
> ---> PASV
> <--- 227 Entering Passive Mode (xx,xxx,xxx,xx,5,122)
> ---- Connecting data socket to (xx.xxx.xxx.xx) port 1402
> **** connect: Connection refused
> ---> LIST
> ---> ABOR
> ---- Closing aborted data socket
> ---- Closing control socket
> ls: Success
> 
> 
> 2. I also tried dante v1.1.14:
> 
> I installed dante and recompiled the lftp using the --with-socksdante
> flag. I also setup the /etc/socks.conf file (it is actually
> /etc/socks/socks.conf in my Gentoo Linux machine) as below:
> route {
>         from: 0.0.0.0/0   to: 0.0.0.0/0   via: 123.123.123.123 port =
>         8888
>         protocol: tcp udp                # server supports tcp and udp.
>         proxyprotocol: socks_v5 # server supports socks v4 and v5.
> }
> 
> In lftp, when I open the site using "open my_site_bookmark", it returns
> immediately with:
> **** control-socket: Transport endpoint is not connected
> cd: Fatal error: control-socket: Transport endpoint is not connected
> 
> Because of the "cd" at the begining of the second line above, I think
> lftp or dante didn't wait for the connection to be established before
> issuing the "cd" command.
> 
> I also tried to set the LD_PRELOAD="/usr/lib/libdl.so
> /usr/lib/libsocks.so" (I has to specify the path /usr/lib here,
> otherwise, it will error out complaining not able to find the libdl.so
> file) env. flag, but got the same error in lftp.
> 
> Tried "socksify lftp", same error.
> 
> The lftp debug output for the "open my_site_bookmark" command (real
> server IP address masked):
> ---- Resolving host address...
> ---- 1 address found
> ---- Connecting to xxx.xxx.xx.xxx (xxx.xxx.xx.xxx) port 8456
> **** control-socket: Transport endpoint is not connected
> ---- Closing control socket
> cd: Fatal error: control-socket: Transport endpoint is not connected
> 
> 
> 
> I am totally clueless now. I really appreciate it if you can offer any
> help. Thank you! 
> -- 
>   Alan Feng
>   [EMAIL PROTECTED]
> 
-- 
  Alan Feng
  [EMAIL PROTECTED]

Reply via email to