lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

> The support for passive ftp in luasocket is partial, at least in what I
> downloaded at the end of last month.  Since passive ftp is all I can do
> from behind my firewall, I had to come up with a cheap trick.  In case
> anyone else can use it, I explain it below.

In the first version of LuaSocket, there was no support for server
sockets. Therefore, FTP support was always passive. There was no way to
bind on a local address and wait for the server to start a connection.
After the server support became available in the C layer, the FTP Lua
code was changed to use the PORT command instead, since this is the
default behaviour for FTP.  I left the old PASV code there because some
day I would like to find out how to fallback to passive mode if the
active mode fails, or perhaps allow the user to chose the data
connection mode.

Maybe it is time to do so.

[]s,
Diego.