Undefined Rants

Code, Ramen and Avocado

Bypass Proxy Setting to Us Enable NPM Install, Grunt Server, Git Clone


I don’t know if this happens to everyone but when I’m connecting my university wifi which using secure web proxy server, I failed to do git clone, npm install and my grunt localhost failed to connect. So today after an hour of googling, I solved this problem and I am writing this blog post where I preview my draft on my localhost in my university.


To do git clone, npm install from terminal, we just have to setup a few lines in our terminal dot file. I am using zsh so I’ll configure my setting in .zshrc. If you’re using bash you just have to do the same thing in .bashrc.

vim ~/.zshrc
// Add this line in the dot file
export http_proxy=http://[address]:[portnumber]/
export https_proxy=$http_proxy

Substitude your server address into [address] and port number into [portnumber].[address] will looks like proxy.example.com while [portnumber] is something like 8080. By doing this, you should be able to do git clone , npm install inside terminal.

Ok, grunt localhost now. Easy setup, if you’re using Mac OS like me, go to Network -> Advanced -> Proxies(tab). When you see the Bypass proxy settings for these Hosts & Domains: then you are on the right place. Just insert the address you want to bypass. bypass-setting-localhost

Here, I bypass the localhost and now I can access my grunt localhost(for eg:localhost:8000) using university wifi. If you are using other OS I believe the setup isn’t going to change much.