ftplib two server "proxy" support
gcash
gcash at luncheonmeat.cfl.rr.com
Thu Nov 7 20:53:14 EST 2002
Is there anyone who's done support for the 2 server model of the FTP
RFC-959, the thing that most UNIX FTP clients call "PROXY" ??
I'm talking about Figure 2 in Section 2.3 of RFC-959 and *NOT* a firewall
or other type of intermediate proxy.
This is where you open a control connection to 2 remote servers and command
one to send a file to the other one. The normal FTP session looks
something like: (if the two servers are named "spam" and "eggs")
#> ftp spam
FTP> user joe
FTP> pass ######
FTP> proxy open eggs
FTP> proxy user bob
FTP> proxy pass #####
at this point you're logged into spam as "joe" and eggs as "bob".
now you can say:
FTP> bin
FTP> proxy bin
FTP> proxy get pythonmodule.c
and "pythonmodule.c" is transferred *by* *direct* *connection* from spam to
eggs.
You can also say things like:
FTP> proxy ls
and get a directory listing from eggs.
The reason I want this is because I'm transferring huge, simply enormous,
mindbogglingly big files and this cuts *way* down on the network traffic
that would happen if I simply opened connections to the two servers and
copied the files between them. Plus the pipe between the servers is
relatively large. And dammit, I can't put Python on either of the servers,
either!!
Please someone say they've done it, as I'm seriously not looking forward to
having to do it myself.
>From looking at the FTP client sources, I think I could also hack it by
opening connections to both servers, then sending the appropriate 'PORT'
command followed by a 'STOR' or 'RETR'
Any suggestions?
-gc
--
Christmas is weird. What other time of the year do you sit in front of
a dead tree and eat candy out of your socks?
-- Metamorph at mmcable.com (alt.gothic)
More information about the Python-list
mailing list