jnfuller.freeshell.org - The home page of Josh Fuller
   


The homepage of Josh Fuller.


Categories

 ·dance
 ·film
 ·als
 ·markus
 ·music
 ·tsfwon
  ·hardware
  ·networks
  ·software
 ·linux
  ·debian
  ·TELUS
  ·voip
   ·regex
 ·unix
  ·bsd
 ·xnu


2008
Months
May
Oct Nov Dec

Josh Fuller
jnfuller at gmail dot com

Subscribe

Subscribe to a syndicated feed of my weblog
       

index / technology / unix / bsd / host-specific-proxy-cshrc.html

Wed, 28 May 2008

setenv http_proxy using .cshrc when granted specific dhcp hostnames

We use DHCP assigned host addresses at work and I've recently switched my development laptop to FreeBSD after the Debian SSH security fiasco.

I've been spoiled by bash and never really used csh very often but I'm finding that I really like the scripting syntax and way environments are set.

One of the first things I've done is add a section to my .cshrc to set my http_proxy and HTTP_PROXY for our corporate firewall whenever I am on our network.

The basic syntax is...

setenv MYHOST `hostname`
if ( == "corporate.host.name") then
setenv HTTP_PROXY http://corporate.web.proxy:8080/
setenv http_proxy http://corporate.web.proxy:8080/
endif

Now, whenever I login to our corporate network and spawn a shell session using BSD the script automajickally sets up my proxy for me.

Nice!

email: Josh Fuller | tag: /technology/unix/bsd | permanent link | Share on Facebook