Linux Setup

2 min read

Preparation: Have proxy credentials ready

Prior to setup, ensure you have the following details:

  • InstantProxies IP address
  • Port number (defaults to 8800 unless otherwise specified)
  • Username and password (if using credential-based authentication)

Set up proxy in Linux

Basic concept (works for all Linux setups)

Most Linux apps use one of these methods:

  • Environment variables (http_proxy, https_proxy)
  • Application-specific proxy settings (browser, apt, etc.)

Your proxy format will usually be:

HTTP/HTTPS proxy format

http://IP:PORT

With username/password

http://USERNAME:PASSWORD@IP:PORT

If using IP-based authentication

This means your server’s IP should be whitelisted to InstantProxies dashboard.

Step 1: Set environment variables

export http_proxy="http://IP:PORT"
export https_proxy="http://IP:PORT"
export ftp_proxy="http://IP:PORT"

Step 2: Make it permanent

Add to ~/.bashrc or ~/.profile:

echo 'export http_proxy="http://IP:PORT"' >> ~/.bashrc
echo 'export https_proxy="http://IP:PORT"' >> ~/.bashrc
source ~/.bashrc

Step 3: Test it

curl -I http://example.com

If using username/password authentication

Format:

export http_proxy="http://USERNAME:PASSWORD@IP:PORT"
export https_proxy="http://USERNAME:PASSWORD@IP:PORT"

Test:

curl -x http://USERNAME:PASSWORD@IP:PORT https://ifconfig.me

Using HTTP/HTTPS Datacenter Proxies vs Rotating Residential

A. Datacenter proxies (static IPs)

Example:

export http_proxy="http://user:pass@IP:PORT"

B. Rotating residential proxies

These usually rotate automatically per request or per session.

http://USERNAME:[email protected]:PORT

Using proxy with specific Linux tools

A. APT (Debian/Ubuntu package manager)

sudo nano /etc/apt/apt.conf.d/95proxies

Add:

Acquire::http::Proxy "http://USERNAME:PASSWORD@IP:PORT";
Acquire::https::Proxy "http://USERNAME:PASSWORD@IP:PORT";

B. Wget

nano ~/.wgetrc

Add:

use_proxy = on
http_proxy = http://USERNAME:PASSWORD@IP:PORT
https_proxy = http://USERNAME:PASSWORD@IP:PORT

C. Git

git config --global http.proxy http://USERNAME:PASSWORD@IP:PORT
git config --global https.proxy http://USERNAME:PASSWORD@IP:PORT

D. Curl (one-time use)

curl -x http://USERNAME:PASSWORD@IP:PORT https://example.com

E. Proxychains (advanced)

Install:

sudo apt install proxychains

Edit config:

sudo nano /etc/proxychains.conf

Add at bottom:

http IP PORT USERNAME PASSWORD

Run:

proxychains curl https://ifconfig.me

Quick Sanity Test

curl -x http://USERNAME:PASSWORD@IP:PORT https://api.ipify.org

If it returns the proxy IP → setup is correct.