Jump to content
xisto Community
Sign in to follow this  
saneax

How To Download/upload File Through A Ftp Proxy Server With 'curl'

Recommended Posts

This help is for linux machines behind a FTP proxy.. (Note: Squid is not a true FTP Proxy server)

 

Say the proxy server is squid configured to be running on ' 192.168.0.10' Port '3128'

then some of the things we can do..

 

* List Files On FTP Server

 

curl --proxy 192.168.0.10:3128  xyz%3Amypass%40sharethespace.com%3A21

 

* Download a file

 

curl -o STSServerInstaller.exe --proxy 192.168.0.10:3128 http://forums.xisto.com/no_longer_exists/

 

* Upload multiple files to the ftp server..

 

curl --upload-file "{rarlinux-3.6.0.tar.gz,vmlogo.xpm}" --verbose --proxy 192.168.0.10:3128  xyz%3Amypass%40sharethespace.com%3A21

 

Note: We are uploading two files ie. rarlinux-3.6.0.tar.gz and vmlogo.xpm, similarly we can state more files, with a comma seperated list.

 

* We can also give the username/ password in options which is much safer than using it on the URL.

 

curl --upload-file "{rarlinux-3.6.0.tar.gz ,vmlogo.xpm}" --verbose --proxy 192.168.0.10:3128 -u xyz:mypass  sharethespace.com 

 

curl -o STSServerInstaller.exe --proxy 192.168.0.10:3128 -u xyz:mypass http://forums.xisto.com/no_longer_exists/

 

curl --proxy 192.168.0.10:3128 xyz:mypass http://forums.xisto.com/no_longer_exists/

 

 

CURL is a free GPL'ed Utility available on various platforms. in linux it comes by default.. in case its not there, please visit https://curl.haxx.se/download.html and download the version required for your platform. Windows Binary download is here

 

Note: The normal FTP client (Shell or ftp on dos prompt) does not work with ftp proxy servers.

 

CURL is a free GPL'ed Utility available on various platforms. in linux it comes by default.. in case its not there, please visit https://curl.haxx.se/download.html and download the version required for your platform. Windows Binary download is here

 

Note: The normal FTP client (Shell or ftp on dos prompt) does not work with ftp proxy servers.

Share this post


Link to post
Share on other sites

This is a very nice tutorial; thanks B) I've used the curl function in PHP before to grab data from another remote webpage. It's a cool function to be able to grab statistics that are often updated from another website and post information related to that data on your own website.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.