Hi all
I'm write FTP applicatioin, but it must use port mode for transfer data and
through gateway. i want to known how to do?
My colleague did mention Indy (
http://www.indyproject.org). This library
is not only free but open source. It includes quite a vast amount of FTP
functionality including PORT and PASV transfers plus quite a lot of other
nifty stuff including some of the latest FTP extended commands (I know
because I have quite a bit to that client over time). We do support quite
a number of proxy configurations and we have an entire section in our
knowledge base that discusses proxies (there's a link right on the main
page).
Since you are talking about a gateway, I wonder what type of gateway you
really are talking about. There's many different types of proxy
configurations in use today including SOCKS, NAT, HTTP Connect through, and
some specialized FTP proxies. You should consult the proxies manual or ask
the administrator. For applications being deployed widely on a potential
variety of network configurations, it's best to utilize as much support
from your library as you can.
All of this having been said, FTP really is NOT firewall proxy friendly at
all because that protocol uses two connections (a control connection for
sending commands and a data channel for sending and receiving data), IP
addresses and port combinations are communicated, and in PORT transfers,
the client listens on a port for one connection. About the only reason I
can see for FTP working on some NAT IP masquerading configurations is that
the NAT has some smarts about the FTP protocol and will do appropriate
fix-ups between the client and the server including intercepting PORT
commands on the control connection. In some firewall configurations,
administrators have to open up several ports on their firewalls just for
FTP to work.
HTH.
--
J. Peter Mugaas - Indy Pit Crew
Internet Direct (Indy) Website -
http://www.nevrona.com/Indy
Personal Home Page -
http://www.wvnet.edu/~oma00215
If I want to do business with you, I will contact you. Otherwise, do not
contact me.