Preparation: Have proxy credentials ready
Before setup, make sure you have the following details:
- InstantProxies IP address
- Port number
- Username and password if using credential-based authentication
If your setup uses IP allowlisting instead of credentials, make sure your current environment is already authorized. If needed, start with Authorizing Your IP Address.
Set up proxy in Linux
Basic concept
Most Linux applications use one of these methods:
- Environment variables such as
http_proxyandhttps_proxy - Application-specific proxy settings such as browser, package manager, or Git configuration
Your proxy format will usually be:
HTTP or HTTPS proxy format:
http://IP:PORT
With username and password:
http://USERNAME:PASSWORD@IP:PORT
If you need the canonical format reference first, see Endpoints, Protocols, and Connection Strings.
If using IP-based authentication
This means your server or workstation public IP should already be authorized in the 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 persistent
Add the variables 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 and password authentication
Use this format:
export http_proxy="http://USERNAME:PASSWORD@IP:PORT"
export https_proxy="http://USERNAME:PASSWORD@IP:PORT"
Test it with:
curl -x http://USERNAME:PASSWORD@IP:PORT https://ifconfig.me
Using proxy with specific Linux tools
A. APT (Debian or 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 the config:
sudo nano /etc/proxychains.conf
Add at the 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, the basic setup is working.
For a more direct validation step after setup, continue to Verify Your Connection.
Troubleshooting notes
- If the connection fails, recheck the host, port, and authentication method.
- If IP-based authentication is active, confirm that the public IP of the Linux machine is the one that was actually authorized.
- If one tool works but another does not, the second tool may be ignoring shell proxy variables and may need tool-specific configuration.
If issues continue, use Connectivity Troubleshooting.
Next step
After the Linux proxy path is working, continue to Verify Your Connection to confirm the runtime path. If you want browser-specific guides next, continue to Platform and Browser Setup.