407 Proxy Authentication Required
Check The username or password is wrong or has an unencoded special character.
Fix Copy the details again from My assets and percent-encode special characters.
How to set a proxy on Linux: the http_proxy, https_proxy and no_proxy variables, keeping them after a restart, the GNOME proxy panel, and separate settings for apt and dnf.
Have four values from My assets ready: address, port, username and password. For Linux tools choose the HTTP protocol when you buy: Proxy302 HTTP uses port 2222 (SOCKS5 uses port 3333), and a static IP is issued with one protocol only. This page covers Linux only: variables, GNOME, apt and dnf. The system-wide proxy panels of Windows 11 and macOS, and the idea of a system proxy against a proxy inside a program, are in the proxy settings guide, and the curl guide covers curl options in detail.
An environment variable is a named value that a program reads when it starts. Command-line programs on Linux look for a proxy in variables named http_proxy, https_proxy and no_proxy. Run the lines below in the terminal, replace HOST, PORT, USERNAME and PASSWORD, and every program you start from that same terminal window can use them. Closing the window forgets them, which makes this a safe way to try a proxy first.
http_proxy is used for http:// addresses and https_proxy for https:// addresses. The value is the address of the proxy itself, so with an HTTP proxy it starts with http:// in both variables. According to the curl documentation, if you also set ALL_PROXY, a variable for one protocol wins over it.
export http_proxy="http://USERNAME:PASSWORD@HOST:PORT"
export https_proxy="$http_proxy"
export no_proxy="localhost,127.0.0.1,.example.internal"
export HTTP_PROXY="$http_proxy"
export HTTPS_PROXY="$http_proxy"
export NO_PROXY="$no_proxy"Replace HOST, PORT, USERNAME and PASSWORD with the values from My assets.
The curl documentation says all proxy variable names except http_proxy can also be written in upper case, such as HTTPS_PROXY, and that http_proxy is accepted only in lower case because of the CGI protocol (a way web servers pass requests to scripts), where an upper-case HTTP_PROXY has caused security problems. So the lower-case names are the ones to rely on, and the example also sets the upper-case ones because other programs may read only those. How each program reads them is up to that program: if one ignores your proxy, look for its own documentation.
no_proxy is a comma-separated list of host names that should not use the proxy; the curl documentation says a name that starts with a dot matches the whole domain, so .example.internal matches www.example.internal, and a single * matches everything. Put localhost, 127.0.0.1 and your own internal addresses there so local traffic does not go out through the proxy.
If the username or password contains special characters, percent-encode them in the address: @ becomes %40, : becomes %3A, / becomes %2F, # becomes %23, % becomes %25. Otherwise the address is split in the wrong place and the proxy answers with an authentication error. The easiest way to avoid typos is to copy the details from My assets. Also remember that a password written into a variable or a config file can be read by anyone who can read that file or the command history.
Variables set in the terminal vanish when you close it. To keep them, put the same lines in the startup file of your shell: ~/.bashrc for bash, ~/.zshrc for zsh. Open a new terminal afterwards, or run source ~/.bashrc, to load them.
For the whole system you can use /etc/environment. The pam_env manual says it holds simple KEY=VAL pairs on separate lines, that an export keyword is ignored, and that it is applied only when an application opens a PAM session. In practice that means graphical and text logins, but the manual does not list them, so log out and in again after editing and test with the check below. Remember to remove the proxy from /etc/environment later, because it applies to every user and every program.
# ~/.bashrc (or ~/.zshrc): applies to every new terminal of your user
export http_proxy="http://USERNAME:PASSWORD@HOST:PORT"
export https_proxy="$http_proxy"
export no_proxy="localhost,127.0.0.1"
# /etc/environment: for the whole system, plain KEY=value lines
http_proxy=http://USERNAME:PASSWORD@HOST:PORT
https_proxy=http://USERNAME:PASSWORD@HOST:PORT
no_proxy=localhost,127.0.0.1The first part is for one user, the second for the whole system; use one of them, not both.
Open the Activities overview, type Network, open it, and choose Network proxy in the list on the left. The GNOME Help page describes this path; wording can differ between GNOME versions.
The options are None (programs connect directly), Manual and Automatic (a link to a configuration file). Choose Manual.
For each protocol you want to proxy, enter the proxy address and port: HTTP, HTTPS, FTP or SOCKS. For an HTTP proxy fill in HTTP and HTTPS with the same address and port.
The GNOME Help page says applications that use the network connection use these settings, but it does not say which programs read them and does not mention a username or password. Browsers and desktop apps often follow it; terminal tools and apt usually do not, so set those with the sections above and below. For a proxy with a username and password, use the variables instead of this panel.
apt downloads packages with its own settings, and sudo may not pass the variables of your terminal on to it: the sudoers manual says commands run in a new, minimal environment by default (env_reset). So give apt its own file. Create /etc/apt/apt.conf.d/95proxy with the two lines below. The apt-transport-http manual documents Acquire::http::Proxy and the address form scheme://[[user[:pass]@]host[:port]/] with schemes socks5h, http and https, and says the value DIRECT means no proxy. It also says credentials can be kept in apt_auth.conf instead of the address.
The official page we read does not describe Acquire::https::Proxy itself; apt.conf only says the https scope is covered in the apt-transport-https manual, which we did not read. The same form is commonly used for https, so keep the second line and confirm with sudo apt update.
# /etc/apt/apt.conf.d/95proxy
Acquire::http::Proxy "http://USERNAME:PASSWORD@HOST:PORT/";
Acquire::https::Proxy "http://USERNAME:PASSWORD@HOST:PORT/";Create the file with sudo, for example sudo nano /etc/apt/apt.conf.d/95proxy.
dnf has its own settings in /etc/dnf/dnf.conf. The DNF reference lists proxy, proxy_username and proxy_password for the [main] section, and says that if proxy is not set, dnf falls back to curl environment variables such as http_proxy. You can put the username and password in their own options, which avoids percent-encoding.
# /etc/dnf/dnf.conf
[main]
proxy=http://HOST:PORT
proxy_username=USERNAME
proxy_password=PASSWORDAdd the three lines under the existing [main] heading.
For curl you can use SOCKS5: ALL_PROXY=socks5h://USERNAME:PASSWORD@HOST:3333. In the curl documentation socks5 resolves the website name on your computer and socks5h leaves it to the proxy, so socks5h keeps name lookups from going around the proxy. Do not assume other programs understand such a variable. The apt-transport-http manual lists socks5h among the address schemes for apt, but the dnf page we read does not describe SOCKS5; to keep one setup for both, use an HTTP proxy for package managers.
The variables above are not passed into Docker containers automatically, and the Docker daemon has its own settings. These are covered in a separate guide.
Run the first command below. It shows the IP, country and network that websites see. The guide on how to check your proxy IP explains the ip, country, city and org fields.
Run sudo apt update or sudo dnf makecache. If it downloads without errors, the file works. If it times out, the proxy is not being used or is not reachable.
Run curl with the variables set, then open another terminal where they are not set. The two answers should show different IP addresses.
curl https://ipinfo.io/json
sudo apt update # Debian, Ubuntu
sudo dnf makecache # Fedora, RHEL and relativesRun the first line in the terminal where the variables are set.
In the terminal run the unset line below. Remove the lines you added from ~/.bashrc or /etc/environment, delete /etc/apt/apt.conf.d/95proxy, remove the proxy lines from dnf.conf, and switch the GNOME panel back to None. Then run the curl check again and confirm your usual address shows.
unset http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY ALL_PROXYThis affects the current terminal only; the files are edited separately.
Check The username or password is wrong or has an unencoded special character.
Fix Copy the details again from My assets and percent-encode special characters.
Check sudo may start apt with a clean environment.
Fix Create /etc/apt/apt.conf.d/95proxy as shown above.
Check Terminal programs read their own variables.
Fix Set http_proxy and https_proxy as shown above.
Check curl accepts only lower-case http_proxy.
Fix Set http_proxy in lower case.
Check The proxy does not answer on the port, or the IP lease has ended.
Fix Check the lease date in My assets and run the curl check.
A static ISP IP fits when you want one permanent address for a server or a work machine: the IP stays fixed for the whole lease term and does not rotate. Choose HTTP at purchase, because package managers and most command-line tools on Linux work with HTTP proxies. For traffic-based work, rotating residential traffic is billed per GB, with HTTP on port 2222 and SOCKS5 on port 3333 of proxy.proxy302.com. Details are on the static residential proxies page.
Open the static ISP page, choose the country, set Protocol to HTTP, choose the term and the quantity, then review the cost and generate.
Open My assets and copy HOST, PORT, USERNAME and PASSWORD. The Connect page shows a ready example with your own details. HTTP uses port 2222.
Put the values into http_proxy and https_proxy (and into the apt and dnf files if you use them).
Check the exit with curl https://ipinfo.io/json.
From mainland China, start the helper tool from the Connect page first and keep it open while you use the proxy.
A static ISP IP costs US$0.50 for one day and US$7.99 for 30 days, about US$0.27 per day, the same in every country. Availability by country changes daily and is shown on the order page. There is no free trial, and the smallest purchase is one IP for one day.
HTTP. The dnf page we read describes only a proxy URL without naming SOCKS5, so HTTP is the safe common choice for package managers. SOCKS5 works well with curl.
By default sudo runs commands in a new, minimal environment (env_reset in the sudoers manual). Give apt and dnf their own configuration files.
Lower case is the reliable choice for curl. Setting both costs nothing and covers programs that read only the upper-case names.
No. Terminal programs read the environment variables instead.
Official documentation · Confirmed on:
Read on 2 November 2026: the [scheme]_proxy variables, ALL_PROXY, precedence of a specific variable, upper case allowed for all names except http_proxy, NO_PROXY as a comma-separated list, a leading dot matching a whole domain.
The page gives only an http:// example and states no rules for the proxy address scheme.
Official documentation · Confirmed on:
Read on 2 November 2026: socks5 resolves the host name in curl, socks5h leaves resolving to the proxy.
Official documentation · Confirmed on:
Read on 2 November 2026: configuration fragments live in /etc/apt/apt.conf.d/ and are read in alphanumeric order; the http and https scopes are documented in the apt-transport-http and apt-transport-https manuals.
The page does not describe Acquire::https::Proxy itself and has no HTTP proxy example.
Official documentation · Confirmed on:
Read on 2 November 2026: Acquire::http::Proxy, the http_proxy variable for system-wide configuration, the value DIRECT for no proxy, the address form scheme://[[user[:pass]@]host[:port]/] with schemes socks5h, http and https, and apt_auth.conf(5) as an alternative for credentials.
The page covers only the http scope. The apt-transport-https manual was not read. It also lists the schemes socks5h, http and https.
Official documentation · Confirmed on:
Read on 2 November 2026: proxy, proxy_username, proxy_password and proxy_auth_method in the main section, and the default file /etc/dnf/dnf.conf. If proxy is unset, curl environment variables such as http_proxy apply.
Official documentation · Confirmed on:
Read on 2 November 2026: Activities, Network, Network proxy; the options None, Manual and Automatic; Manual takes an address and port for HTTP, HTTPS, FTP and SOCKS.
The page does not mention a username or password for the proxy and does not list which programs read these settings.
Official documentation · Confirmed on:
Read on 2 November 2026: /etc/environment holds simple KEY=VAL lines, an export keyword is ignored, and the module only acts when an application opens a PAM session.
The page does not list which login methods open such a session.
Official documentation · Confirmed on:
Read on 2 November 2026: env_reset is on by default and runs commands in a new, minimal environment; the -E option can switch it off for a command only if the setting SETENV allows it.
The page does not mention http_proxy by name.
Product observation · Confirmed on:
Product facts file of the site (checked against the console, the backend and the price table on 18-19 October 2026): protocols and ports, prices in US$ (1 PTC = US$1), lease terms, no free trial.
Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.