NITS Proxy for Terminal Commands (except SSH)
NOTE: Git no longer allows authentication through HTTPS (only SSH), and setting http.proxy for git won't do anything unless using personal access token or OAuth in some form like VSCode GitHub Pull & Push Request extension
Proxy Settings
-> Turn on Use a proxy server
Address (For Hostels) : 172.16.199.40
Address (For Labs & Library) : 172.16.199.20
Port : 8080
Exception (Big Input Box) : *.local
NOTE: Turn off proxy when connected to mobile hotspot. Also check manual installations if some tools don't inherit the proxy values from system
This will enable you to switch between Hostel Proxy, Lab & Library Proxy and Mobile Hostpot with just one easy-to-remember command.
$ git clone https://github.com/resyfer/nits_proxy.git
$ cd nits_proxy
$ sudo ./install.sh
$ cd .. && rm -rf nits_proxy
NOTE: During the prompts, the values inside []
in italics are default values, you can press Enter
without giving any value, and it will take the default value
NOTE: Only if you use a shell different from bash
then you need to add the line given below to the rc file of your shell (eg. ~/.zshrc
, etc.)
alias nits='source nitsproxy.sh'
NOTE: If you use a shell different from bash
then you need to replace bashrc
in the line below to the rc file of your shell (eg. ~/.zshrc
, etc.)
$ source ~/.bashrc
or you can close the terminal and start a new one.
$ sudo cp nitsproxy.sh /bin
$ nits
NOTE: If you are using Linux and have installed the script, you are not required to do these steps unless the individual tools are not working as intended.
For other operating systems, you might have to set and unset the proxies manually if they don't inherit the proxy settings from the system.
- BH9 :
http://172.16.199.41:8080
- Other Hostels :
http://172.16.199.40:8080
- Labs and Libraries :
http://172.16.199.20:8080
- Mobile Hostpot : None
$ git config --global http.proxy PROXY_VALUE
$ git config --global https.proxy PROXY_VALUE
$ git config --global --unset http.proxy
$ git config --global --unset https.proxy
$ git config --global --get htts.proxy
$ git config --global --get http.proxy
$ npm config set proxy PROXY_VALUE
$ npm config set https-proxy PROXY_VALUE
$ npm config rm proxy
$ npm config rm https-proxy
$ sudo pip install --proxy PROXY_VALUE <pkg_name>
$ pip install --proxy PROXY_VALUE <pkg_name>
This sets both http and https proxy.
Settings > Search for "proxy" > Https: Proxy