Re: exporting proxy settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 21, 2004 at 01:31:49AM +0200, Chadley Wilson wrote:
> Reply-To: For users of Fedora Core releases <fedora-list@xxxxxxxxxx>
> 
> It there a way to save the settings from the command line,
> For example I export http_proxy=<settings> and then make this a
> permanent setting?

I see two other good general answers but you were unclear
about the context, problem and programs that you want to use 
your proxy to fix.

If it is only yum that you want to set a proxy for, I would first make
a shell script (/usr/local/bin/yum-proxy) that looks a bit like:

  #!/bin/bash
  export   http_proxy=http://YourProxySettings	
  # example:  export   http_proxy="proxyuser:proxypass@http://192.168.0.99:port";
  # example:  export   http_proxy="proxyuser:proxypass@http://host.name.com:port";
  /usr/bin/yum  ${1+"$@"}
  #XXX note to self  ${1+"$@"}, $*; $@; "$*"; "$@" which is best here?

Setting "http_proxy" for ALL users and ALL applications could have
unexpected interactions. First focus on one application, then one
user....

If you set it globally then have a broken network can you read local
html documents?  If the proxy moves or is down? What if DHCP is
expected to pass this hint in for those folk?

Setting the environment variable "http_proxy" in one or more of
~/.bash_profile, /etc/profile, ~/.bashrc can help point and click GUI
packages.  

There can be interactions with per application configuration options
(like netscape, mozilla, up2date) where it can be unclear what proxy
is active for what application if you get carried away.

A general caution about environment variables: Note that some places
the environment variables HTTP_PROXY, HTTP_PROXY_USER,
HTTP_PROXY_PASS, http_proxy, http_proxy_user, http_proxy_pass,
http_proxy_exclude, CGI_HTTP_PROXY, no_proxy etc. are of interest
depending on library support and more.  Some applications will accept
both upper and lower case but what if http_proxy=/=HTTP_PROXY?

Summary: set it in ONE place, KIS

-- 
	T o m  M i t c h e l l 
	/dev/null the ultimate in secure storage.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux