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

Re: Set http_proxy on cardctl insert



On Thu, 12 Dec 2002 16:22, Philipp Haller wrote:
> I am trying to cope with different network environments. I set up various
> schemes in /etc/pcmcia/network.opts. This works fine. For one of those
> schemes I need to set http_proxy. I tried the following (in
> /etc/pcmcia/network.opts): # Extra stuff to do after setting up the
> interface
>     start_fn () { http_proxy="http://proxy1.rz.uni-karlsruhe.de:3128/"; ;
> return; } # Extra stuff to do before shutting down the interface
>     stop_fn () { http_proxy="" ; return; }

Those are short-lived shell scripts run by the pcmcia cardmgr process, other 
processes don't see their environment variables.

> But http_proxy won't be set. I tried putting "export " in front of
> "http_proxy" but no luck. Is there a different place where I have to set
> http_proxy then? Of course after switching schemes I want http_proxy to be
> unset.

If you want to change the proxy settings for running processes (such as bash 
sessions in X-terms) then this is impossible.

The best thing to do is install Squid on your laptop, configure everything to 
use localhost:8080 as the proxy, and then have the card insert script use M4 
to create an appropriate squid.conf file that tells it to forward requests to 
the appropriate proxy (or go direct as the case may be).

This works well for me.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page



Reply to: