From owner-freebsd-questions@FreeBSD.ORG Wed Apr 14 05:58:15 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46BDD16A4CE for ; Wed, 14 Apr 2004 05:58:15 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id E59A143D2F for ; Wed, 14 Apr 2004 05:58:13 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i3ECuqv9031962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Apr 2004 13:56:52 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i3ECuqF2031961; Wed, 14 Apr 2004 13:56:52 +0100 (BST) (envelope-from matthew) Date: Wed, 14 Apr 2004 13:56:52 +0100 From: Matthew Seaman To: =?iso-8859-1?Q?Ant=F3nio?= Amaral Message-ID: <20040414125652.GB30945@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , =?iso-8859-1?Q?Ant=F3nio?= Amaral , freebsd-questions@freebsd.org References: <000501c42168$2db887c0$695c88c1@odyssey> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm" Content-Disposition: inline In-Reply-To: <000501c42168$2db887c0$695c88c1@odyssey> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk X-Virus-Scanned: clamd / ClamAV version devel-20040407, clamav-milter version 0.70g cc: freebsd-questions@freebsd.org Subject: Re: FTP client config File X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 12:58:15 -0000 --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--