Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17866 - [wishlist] inhibit http_proxy for some mirrors
Summary: [wishlist] inhibit http_proxy for some mirrors
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-20 05:43 UTC by Toby Dickenson
Modified: 2011-10-30 22:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to portage-2.0.47-r8 to specify that some mirrors should be accessed directly, not via a proxy. (portage.diff,2.07 KB, patch)
2003-04-02 19:09 UTC, Toby Dickenson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toby Dickenson 2003-03-20 05:43:40 UTC
I maintain a local distfile mirror, which is listed first in make.confs GENTOO_MIRRORS. 
My mirror is not always up to date, and doesnt contain every package, so my 
GENTOO_MIRRORS also lists ibiblio. 
 
Some of my gentoo machines are firewalled such that they can not access ibiblio 
directly. They need to use a proxy, which I can set in http_proxy. Access control rules 
on this proxy means that it can not access internal hosts, including the mirror. 
 
I would be nice to be able to configure portage so that it accesses the local mirror 
directly, and ibiblio via the proxy. Browsers have host exclude lists in their proxy 
configurations to support this network topology - it would be nice if portage had an 
equivalent.
Comment 1 Toby Dickenson 2003-04-02 19:07:54 UTC
Attached is a first draft patch to implement this, for portage 2.0.47-r8  
 
This patch adds support for a new make.conf setting, DIRECT_MIRRORS. This is a list of host 
names that should not be accessed via a proxy. 
 
Bypassing a proxy is handled with a change to FETCHCOMMAND (and RESUMECOMMAND). 
This is best illustrated with example... my FETCHCOMMAND line using wget now looks like: 
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR} \${DIRECT 
--proxy=off}" 
The ${DIRECT} section is either included or removed, depending whether it is fetching from a 
mirror whose host name is listed in DIRECT_MIRRORS 
 
This currently works for me. 
 
Some things I'm not sure about: 
1. should DIRECT_MIRRORS contain the host name (as now) or the full mirror URI? 
2. will this be general enough for downloaders other than wget? 
 
 
Comment 2 Toby Dickenson 2003-04-02 19:09:45 UTC
Created attachment 10139 [details, diff]
patch to portage-2.0.47-r8 to specify that some mirrors should be accessed directly, not via a proxy.
Comment 3 Toby Dickenson 2003-09-23 06:28:54 UTC
Ive just been through another round of updates where having this in standard portage would  
have been useful. I cant be the only one that would benefit from this......  
  
This one looks like a low-risk low-effort enhancement, so Im suprised this hasnt attracted  
any attention over the last 6 months. Is there anyone I can nudge?  
Comment 4 Martin von Gagern 2004-08-28 14:03:45 UTC
My choice would be to export no_proxy in the same place where you probably export http_proxy. At least for wget this does the job.
Comment 5 Toby Dickenson 2004-08-29 01:03:28 UTC
> At least for wget this does the job.

Thats a good tip. Many thanks.