Page 1 of 1
Universal Plug and Play
Posted: 2012-07-15, 08:12 UTC
by Hurdet
Do it is possible to add
UPnP support for Ftp?
I am forced to use FTP in passive mode behind a router, if i do not want to do port forward..
Posted: 2012-07-16, 14:27 UTC
by ghisler(Author)
Sorry, I have no idea how to add this. Is there an RFC (official standard documentation) for FTP and UPnP?
Posted: 2012-07-16, 19:27 UTC
by Sob
I don't think there's any standard specifically for FTP with UPnP. I didn't look too hard, but I don't see any reason for it, i.e. there's no need for some deep integration between the two. You just need to open port on router and get its public address, so you can use active mode transfers without relying on some NAT helper.
-
UPnP documentation can be found at
http://www.upnp.org. Quite a lot of stuff there, but TC would only need to add/remove port mapping and it does not require much.
Also Windows provides some API for UPnP, but I didn't have much luck when trying to work with it. And I don't know about support in different OS versions, which does matter for TC (supporting all the historic OSes...).
But what did work great, was small library called MiniUPnPc (
http://miniupnp.free.fr). If nothing more, it could serve at least as source of inspiration. It also includes nice command-line test client dealing exactly with port mapping.
Posted: 2012-07-19, 14:04 UTC
by ghisler(Author)
OK, I will check it. The main problem is that FTP uses a different port for each data connection, and requesting new ports all the time would probably be very slow. But maybe it's possible to reqest a small port range...