On Tue, Apr 13, 2004 at 04:01:19PM +0100, António Amaral wrote:

> Can you please tell me where can I configure the FTP shell client for
> use a proxy? I want to install ports packages but I can’t because I am
> behind of a proxy.

You need to set some variables -- either in the environment, or if
you're installing via ports you can use /etc/make.conf and if you're
using portupgrade(1) you can use either /etc/make.conf or
/usr/local/etc/pkgtools.conf.  See fetch(3) for details on the
variables.  Note that since both ftp(1) and fetch(1) use the same
underlying library to implement FTP transport, these variable will
affect both of those programs.

To make ftp/fetch work via a proxy:

    FTP_PROXY= ftp://username:[EMAIL PROTECTED]:portnum/

    HTTP_PROXY= http-proxy.example.com

You don't need to fill in all of those parts of the URL -- reasonable
defaults will be substituted, so typically you'ld set something more
like the second example.

To set those in the environment, edit your ~/.login (if you use
tcsh(1) or csh(1) as your shell), ~/.profile (sh) or ~/.bash_profile
(bash) and put in the correct style of setting the variable:

   setenv FTP_PROXY ftp-proxy.example.com         (csh -like shells)

   FTP_PROXY=ftp-proxy.example.com ; export FTP_PROXY (sh -like shells)

For /etc/make.conf -- see /etc/defaults/make.conf (or
/usr/share/examples/make/defaults (I think) on 5.x) and look for the
FETCH_ENV setting.  You can set both FTP_PROXY and HTTP_PROXY
variables in one go by:

   FETCH_ENV= "FTP_PROXY=ftp://ftp-proxy.example.com/ 
HTTP_PROXY=http://http-proxy.example.com/";

and for pkgtools.conf, add the settingd to the Environment Variables
section. eg:

   ENV['FTP_PROXY'] = 'ftp-proxy.example.com'

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to