Re: yum access ftp repos without a proxy, http with proxy
Gene Smith <[email protected]>
| Newsgroups | gmane.linux.rpm.yum |
|---|---|
| Message-ID | <[email protected]> |
Les Mikesell wrote: > Gene Smith wrote: >> I have a new situation at work were the proxy server refuses to allow >> *.rpm files to be downloaded because they are "streaming media". >> However, direct connect to the internet is allowed (bypassing the >> proxy) only when ftp is used. So I can set firefox to use the proxy >> only for http and do direct connect with ftp. This allows rpm files to >> be downloaded in firefox if they are on ftp servers. >> >> However, I don't know the correct method to configure yum to do the >> same thing. There is "proxy" setting that I have set in yum.conf. It >> appears to cause both http and ftp to use the proxy. Is there a way to >> tell yum to use the proxy only for http access and to use no proxy >> when ftp connection is attempted? > > It observes the standard environment settings if you don't set a proxy > in the config file: > export http_proxy=http://your.proxy:port > export ftp_proxy=http://your.proxy:port (if it is squid and can proxy > ftp through http) > or omit the ftp_proxy setting to go direct. OK. I only have http_proxy set and it seems to work in yum for http access (retrieves the mirror list). So I guess I really don't need proxy=... again in yum.conf. > >> I see a possibility of setting >> proxy=_none_ Yes, don't need this >> which could be placed right before baseurl=ftp://.... if a list of >> explicit urls are used, or maybe after mirrorlist=http://... if a list >> of mirrors is requested. (http connections require the proxy.) >> >> I don't have a way to test this now since my current distro (fedora 8) >> seems to only be archived on 3 http servers and not on ftp. Actually, this is wrong. There are ftp servers out there for f8. When I go to http://mirrors.fedoraproject.org/publiclist/Fedora/8/ it shows two ftp sites listed although my mirrorlist url set in yum.conf only returns http sites and in US: http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=i386 # repo = fedora-8 arch = i386 country = US http://archive.kernel.org/fedora-archive/fedora/linux/releases/8/Everything/i386/os/ http://kdeforge.unl.edu/mirrors/fedora-archive/fedora/linux/releases/8/Everything/i386/os/ http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/8/Everything/i386/os/ But there is actually good ftp site here: ftp://archive.kernel.org/fedora-archive/fedora/linux/releases/8/Everything/i386/os/ and another in Germany that aren't show at my mirrorlist url. So if I get rid of the my mirrorlist and adapt the above ftp url as a baseurl it works with yum using direct connect ftp. So I guess the new question is: how do you I set a mirrorlist url to also return ftp sites and not just http? And how do I ask for sites in all countries having ftp sites be returned, not just US? >> (I can use >> an external socks server with ssh -D option to download f8 rpms via >> http using firefox but yum does not support socks connections from >> what I understand.) > > Can you get to an external http proxy via ssh port-forwarding? > > ssh -L:port:remote_address:port -l login remotehost > Then in another window while the ssh connection is up: > export http_proxy=http://localhost:port > yum update I could if such a site exists. But I don't have one or know of one. But since FTP is basically working, I think I am OK. I see that f-11 mirrrolist url does return a mixture of ftp and http sites, but mostly http. So if I upgrade to it I should be able to get updates.