FTran - File Transfer

Want a simple file transfer application? How about one that might manage to get past a school firewall that looks for large file transfers, or transfers of a specific type of file? Try FTran.

Features

Installation

To use the pre-compiled program, unzip to a directory and follow the Usage instructions below.
Windows: You may wish to put zlib1.dll into your Windows\System32 directory so it can be used by other programs, but this is not necessary.
Linux: ZLib should automatically be installed as /usr/lib/libz.a, which is why it is not included.

Compilation

Windows: To compile the source, you will need gcc (and optionally make) from MinGW, and ZLib. To build, simply unzip the contents of source zip into a directory and type "make", assuming that make is in your executable path.
Linux: To compile the source, gcc must be installed on your system. Simply extract the source (tar -zxf ftransrcx.tgz), cd into ftransrc/, and type "make".

To disable compression, edit the Makefile and remove -DGZIP from the "DEFS" line and "-lzdll" (Windows), or "-lz" (Linux) from the "LIBS" line.
To change the number of connections made, edit the constant PARALLEL_CONNECTIONS in ftran.c. To change the block size that is (optionally compressed and) transmitted, change BLOCK_SIZE. Changing either of these will not affect compatibility with other copies of FTran, as the lower value for each is chosen while connecting. I suggest not increasing ORIG_PORT or PARALLEL_CONNECTIONS by very much, as the current procedure for choosing ports adds PARALLEL_CONNECTIONS plus a bit to ORIG_PORT numerous times, and the highest port number used MUST be no more than 65,535 (this is a limit imposed by IP).

Usage

To receive a file, simply start the program.
To send a file, start the program and give it the name of the file as an argument. It will ask for the address to connect to when it starts.
When the transfer is complete, the file is saved as "ftran.out" on the receiver's machine (Windows), or wherever stdout was piped (if it was, otherwise "ftran.out") (Linux).

Notes

If you build your own version, it will be compatible with other copies across changes of PARALLEL_CONNECTIONS and BLOCK_SIZE, however it will not be compatible if one copy uses ZLib and the other does not. Also, connections between various operating systems should be compatible.
In the Linux version, if stdout is piped someplace other than the console, the transferred file will be written to stdout instead of ftran.out. This is useful for in-place renaming (ftran > output.file), or even compression (ftran | bzip2 >output.bz2).
While writing this, I realized how much I prefer writing for Linux than for Windows. Here's one reason:
Technically, fopen should work in Windows also, but it is not reliable, and caused read failures constantly.

Download

Windows Application (ftran.exe and zlib1.dll)
Windows Source Code (ftran.c and Makefile)
Linux Application (ftran executable in ftran/)
Linux Source (ftran.c and Makefile in ftransrc/)

1