Ticket #1444 (closed Patch)

Opened 8 years ago

Last modified 7 years ago

Custom PASV settings for the server

Reported by: thejcab Owned by: codesquid
Priority: normal Component: Other
Keywords: Cc: thejcab, codesquid
Operating system type: Operating system version:

Description

When running a FTP server from behind a NAT router,
you need to be able to specify to the server which IP
address to use for PASV transfers. Cannot use the IP
address from the socket because that IP address is
only valid within the local network, and is
inaccessible from the other side of the router.

So, this patch allows you to configure:

- Wether the IP address is customized.
- The actual IP address.
- A range of ports that will be used in a rotating
fashion.

The range of ports is necessary because, in order to
be able to forward connection requests to local
machnes, the router needs to know those ports. You
could always tell the router to forward all ports 1 to
65535, but that's hardly appropriate.

I have this updated server currently running at:

 ftp://anonymous@home.JCABs-Rumblings.com

The files there are temporary Spirit (another
SourceForge project) tests. In case you were curious.

If you want to see what the resulting server looks
like, I put it here for download:

 http://www.JCABs-Rumblings.com/temp/FileZilla%
20server.exe

Salutaciones,

JCAB

Attachments

PASVPatch.patch Download (10.8 KB) - added by thejcab 8 years ago.
The patch file. I hope it works, as it's the first patch file I ever created.

Change History

Changed 8 years ago by thejcab

The patch file. I hope it works, as it's the first patch file I ever created.

Changed 8 years ago by thejcab

Forgot to mention, the implementation is far from perfect.
In particular, the code that rotates the ports is not
thread-safe, and the settings dialog should disable the
options when the "enable" button is unchecked. Still, the
implementation is good enough for my needs, and fixing
those problems shouldn't be much of a problem.

Changed 8 years ago by thejcab

Forgot to mention, the implementation is far from perfect.
In particular, the code that rotates the ports is not
thread-safe, and the settings dialog should disable the
options when the "enable" button is unchecked. Still, the
implementation is good enough for my needs, and fixing
those problems shouldn't be much of a problem.

Changed 7 years ago by codesquid

added in FileZilla Server 0.7.2

Note: See TracTickets for help on using tickets.