GNU Wget is a command-line tool for downloading files. Route downloads through KnoxProxy using environment variables, command flags, or .wgetrc config.
Use environment variables to route through KnoxProxy.
export http_proxy=http://USER:PASS@gw.knoxproxy.com:7000
export https_proxy=http://USER:PASS@gw.knoxproxy.com:7000
wget -qO- https://httpbin.org/ipPass the proxy directly as a command-line option.
wget -e "https_proxy=http://USER:PASS@gw.knoxproxy.com:7000" \
-qO- https://httpbin.org/ipAdd the country code to the proxy username.
wget -e "https_proxy=http://USER-country-fr:PASS@gw.knoxproxy.com:7000" \
-qO- https://httpbin.org/ipSave a file while routing through KnoxProxy.
export https_proxy=http://USER:PASS@gw.knoxproxy.com:7000
wget https://example.com/file.zip -O file.zipSet the proxy permanently in your wget config file.
# Add to ~/.wgetrc
use_proxy = on
http_proxy = http://USER:PASS@gw.knoxproxy.com:7000
https_proxy = http://USER:PASS@gw.knoxproxy.com:7000Mirror a site through KnoxProxy.
export https_proxy=http://USER:PASS@gw.knoxproxy.com:7000
wget --mirror --convert-links --adjust-extension \
--page-requisites --no-parent \
https://example.com/docs/#!/bin/bash
# KnoxProxy + wget
export http_proxy="http://USER:PASS@gw.knoxproxy.com:7000"
export https_proxy="http://USER:PASS@gw.knoxproxy.com:7000"
echo "Exit IP:"
wget -qO- https://httpbin.org/ipEach wget invocation gets a fresh exit IP. For sticky sessions, use USER-session-{id} in the proxy username.
| Problem | Fix |
|---|---|
| Proxy tunneling failed: 407 Proxy Authentication Required | Add USER:PASS to the proxy URL. URL-encode special characters in the password (e.g., # becomes %23). |
| Unable to establish SSL connection through proxy | Verify you are using https_proxy (not http_proxy) for HTTPS URLs. Try adding --no-check-certificate to test (not for production). |
| wget: command not found | Install via package manager: brew install wget (macOS) or apt install wget (Debian/Ubuntu). |
USER-country-de-city-berlin-session-profile07Order matters -- geo flags before the session flag. The session name is free text; use the profile ID so the mapping is self-documenting. Password stays as issued; no flags belong there. HTTP on :7000, SOCKS5 on :7001, same credentials.
Both support HTTP proxies through the same underlying model. wget reads the http_proxy and https_proxy environment variables or a persistent .wgetrc config file, while curl uses its -x flag or a .curlrc file for the same setup. wget is better suited for recursive mirroring and file downloads, while curl is faster for quick API testing and one-off requests.
GNU wget does not natively support SOCKS5 proxies, only HTTP and HTTPS through http_proxy and https_proxy. To route wget traffic over SOCKS5, wrap the command with tsocks or proxychains pointed at the KnoxProxy SOCKS5 port, or switch to curl --socks5 instead, since curl handles SOCKS5 directly.
Set the no_proxy environment variable to a comma-separated list of domains you want wget to reach directly, for example: export no_proxy=localhost,127.0.0.1,.internal.com. wget checks this list before applying http_proxy or https_proxy, so any request to those hosts bypasses KnoxProxy entirely and connects straight to the destination instead.
Use the --save-cookies and --load-cookies flags together. Cookies work the same way through KnoxProxy as they would on a direct connection, since the proxy only relays traffic and does not interfere with cookie handling: wget --save-cookies cookies.txt --load-cookies cookies.txt URL persists a session across multiple proxied requests to the same site.
Rotating residential proxies -- 1 minute setup, instant activation, 14-day money-back guarantee.