Setup Proxy for terminals and more difficult places! (which are not directly accessible!)
Updates to this repo is welcome! Please create a PR to merge changes, or open an Issue to help us add more data to this repo!
- Windows 11
- Windows 10
- Windows Applications (Proxifier)
- Ethernet Connection (Windows)
- Ubuntu
- Git
- Linux Terminal
- MSYS2
- Node
- Pip - Python
Settings > Network & Internet > Proxy > Manual proxy setup > Edit
- Toggle Use a proxy server to On
- Proxy IP address -
172.31.102.29
- Port -
3128
- Click Save
Settings > Network & Internet > Proxy > Manual proxy setup
- Toggle Use a proxy server to On
- Address -
172.31.102.29
- Port -
3128
- Click Save
To run different applications on windows you have to install PROXIFIER
- Download & Install Proxifier
- Setup proxifier based on the following instructions.
Settings > Network & Internet > Ethernet
- Click on Edit button next to IP Assignment.
- Choose Manual.
- Enable IPv4.
- Check the network configuration details for your location (hostel/department) here:
- IP Address - Based on your allocated range
- Subnet Mask - As specified for your location
- Gateway - As specified for your location
- Preferred DNS -
172.31.100.7
- Alternate DNS -
172.31.100.8
- Click on Save.
Make sure to set up the proxy using the steps mentioned here or use Proxifier to run applications.
Note:
- Each hostel, department, and location has its specific network configuration
- The IP address must be unique and not used by any other device on the network
- In case of IP conflict, try a different number within your allocated range
Settings > Network > Network Proxy
- Click on Gear icon
- Choose Manual
- HTTP Proxy -
172.31.102.29
&3128
- HTTPS Proxy -
172.31.102.29
&3128
- FTP Proxy -
172.31.102.29
&3128
- Sockets Host -
172.31.102.29
&3128
- Close the pop-up.
Open command prompt (in Windows) and run the following commands one by one
git config --global --unset-all https.proxy
git config --global --unset-all http.proxy
git config --global --add http.proxy http://edcguest:edcguest@172.31.102.29:3128
git config --global --add https.proxy http://edcguest:edcguest@172.31.102.29:3128
Open terminal (in Linux) and follow the steps below:
- Run
sudo -i
- Enter your root password (password is not visible while typing in linux terminal)
- Run
gedit /etc/apt/apt.conf
- Write
Acquire::http::Proxy "http://edcguest:edcguest@172.31.102.29:3128";
and Save and then Close the text editor - Run
gedit /etc/bash.bashrc
- Write the following at the bottom of the file.
export http_proxy=http://edcguest:edcguest@172.31.102.29:3128/
export ftp_proxy=http://edcguest:edcguest@172.31.102.29:3128/
export https_proxy=https://edcguest:edcguest@172.31.102.29:3128/
- Save and Close the text editor.
- Close the terminal.
Open MSYS2 MSYS prompt (in Windows) and run the following commands one by one
export HTTP_PROXY="edcguest:edcguest@172.31.102.29:3128"
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY
vim .bashrc
Opens the bashrc file.- Press
i
and Add the following lines at the end of the file.
export HTTP_PROXY="edcguest:edcguest@172.31.100.25:3128"
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY
- Press
Esc
and write:wq
and pressEnter
.
Run these commands one by one in command prompt. Make sure Node is Installed and added to path.
npm config set proxy http://edcguest:edcguest@172.31.102.29:3128
npm config set https-proxy http://edcguest:edcguest@172.31.102.29:3128
More help here.
To remove proxy configuration from node, run the following commands
npm config rm proxy
npm config rm https-proxy
npm config --global rm proxy
npm config --global rm https-proxy
Installing python packages also need to have proxy setup. You can install packages behind proxy via the following hack.
pip install --proxy http://<usr_name>:<password>@<proxyserver_name>:<port#> <pkg_name>
Eg.
pip install --proxy http://edcguest:edcguest@172.31.102.29:3128 djangorestframework
Do we need to include this long text each time?
It is recommended, as you might need to sometimes install package normally.
To install requirements.txt
, write the following
pip install --proxy http://<usr_name>@<proxyserver_name>:<port#> -r requirements.txt
Eg.
pip install --proxy http://edcguest:edcguest@172.31.102.29:3128 -r requirements.txt