Set up FTP PROXY via command line in Linux/FreeBSD
Setting up FTP PROXY via command line in Linux/FreeBSDSetting up FTP PROXY for command line tools in FreeBSD and Linux is the same as setting HTTP proxy: you can make use of the environment variable FTP_PROXY.
Assuming Proxy address 192.168.0.1 and port 3128, we use:
Code:
# export FTP_PROXY='http://192.168.0.1:3128'
In case the proxy requires authentication:
Code:
# export FTP_PROXY='http://username:password@192.168.0.1:3128'
To make this setting permanent, add the line to your /etc/profile or ~/.profile or ~/.(bash|sh|ksh)rc.
Removing FTP_PROXY for current shell requires unsetting the variable:
Code:
# unset FTP_PROXY