Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 2004 13:56:52 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        =?iso-8859-1?Q?Ant=F3nio?= Amaral <aamaral@av.it.pt>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: FTP client config File
Message-ID:  <20040414125652.GB30945@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <000501c42168$2db887c0$695c88c1@odyssey>
References:  <000501c42168$2db887c0$695c88c1@odyssey>

next in thread | previous in thread | raw e-mail | index | archive | help

--V0207lvV8h4k8FAm
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 13, 2004 at 04:01:19PM +0100, Ant=F3nio 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=92t 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=3D ftp://username:password@ftp-proxy.example.com:portnum/

    HTTP_PROXY=3D 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=3Dftp-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=3D "FTP_PROXY=3Dftp://ftp-proxy.example.com/ HTTP_PROXY=3Dhttp=
://http-proxy.example.com/"

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

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

	Cheers,

	Matthew

--=20
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

--V0207lvV8h4k8FAm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAfTUUdtESqEQa7a0RAl66AJ4iCMTWJMsjM1WNnMzcLXmxa5jK0QCfTVRX
04lOohQ53puAjj6YhqRx2Cc=
=U24L
-----END PGP SIGNATURE-----

--V0207lvV8h4k8FAm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040414125652.GB30945>