Skip to content

Working behind proxy network

Working behind proxy network

Working on a network behind cooperate proxy might cause many trouble to any developers (including me 🙂 ). So that I want to write this post to share my experience when I’m facing these problems.

Important note for proxy password special characters

First of all, I would like to notice that you can not use special characters inside the proxy password. But for security problem, most of passwords will including special character like @ : ! #

So, to set your proxy password you must percent-encoding these special characters

percent-encoding-working behind proxy network
percent-encoding

Based on these percent-encoding, if your password is: thisI$m!p@ss then it will be thisI%24m%21p%40ss

git proxy

To configure git proxy, open git bash or git cmd and play with the following commands:

Check currently set proxy

Setting git proxy

  • Changing proxyUsername to your proxy user name
  • Changing proxyPassword to your proxy password
  • Changing proxy.server.com to your proxy URL address
  • Changing port to your proxy port number

Setting git proxy for specific domain

Reset git proxy

If you don’t want to use proxy anymore then type the command:

npm proxy

Setting npm proxy

  • Changing proxy.server.com to your proxy URL address
  • Changing port to your proxy port number

Removing npm proxy

bower proxy

.bowerrc

To setup proxy for bower we need to create a file named .bowerrc on the root folder of the project, contents of .bowerrc is as follow:

 

Published inProgramming

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *