Linux Terminal Proxy Setup

Overview

Linux systems allow configuring proxies directly from the terminal by setting environment variables or editing system configuration files. Below is a step-by-step guide to setting up and disabling proxies effectively.

1. Configure Global Environment Proxy

To apply proxy settings system-wide for all terminal sessions, edit the file:
sudo nano /etc/profile
Append the following lines:
export http_proxy="http://username:[email protected]:10080"
export https_proxy="http://username:[email protected]:10080"
Save and exit. Reboot or run source /etc/profile to apply.

2. Configure Bash Profile (User-level)

To apply settings only for the current user, edit:
nano ~/.bashrc
Add the same export lines:
export http_proxy="http://username:[email protected]:10080"
export https_proxy="http://username:[email protected]:10080"
Then apply changes with:
source ~/.bashrc

3. Configure Proxy for Wget

To enable proxy usage with wget, edit the config file:
sudo nano /etc/wgetrc
Uncomment and set the following lines:
http_proxy = http://username:[email protected]:10080
https_proxy = http://username:[email protected]:10080
Save and close.

4. Configure Proxy for Apt

For systems using APT (Ubuntu/Debian), create or modify the file:
sudo nano /etc/apt/apt.conf.d/proxy.conf
Insert:
Acquire::http::Proxy "http://username:[email protected]:10080";
Acquire::https::Proxy "http://username:[email protected]:10080";

5. Disable Proxy Temporarily

To disable the proxy only for the current terminal session:
unset http_proxy
unset https_proxy

6. Disable Proxy Permanently

To remove settings, open the respective file (e.g., .bashrc, /etc/profile, etc.) and delete or comment out the export lines.

Residential Proxies

  • Host: residential.ipnproxy.com
  • Port: 823
  • Format:
bash http http://username:[email protected]:823

Datacenter Proxies

  • Host: dc.ipnproxy.com
  • Port: 10080
  • Format:
bash http http://username:[email protected]:10080

Premium Mobile Proxies

  • IP: {IP_ADDRESS}
  • Port: {PORT}
  • Username: {PROXY_USERNAME}
  • Password: {PROXY_PASSWORD}
  • Format:
bash http http://{username}:{password}@{IP}:{PORT} 
bash socks5 http://{username}:{password}@{IP}:{PORT}

Mobile Proxies

  • IP: {IP_ADDRESS}
  • Port: {PORT} - Format:
bash http http://{IP_ADDRESS}:{PORT}
bash socks5 socks5://{IP_ADDRESS}:{PORT}
Make sure to replace username:password with your actual IpnProxy credentials. If credentials are not needed, you may omit them.
Always validate the proxy setup by running:
https://ipnproxy.com/ip-lookup
curl https://api.ipify.org
If configured correctly, this will return your proxy IP address.