← Guides

Use a fixed-IP proxy with curl, Git, npm, and pip

Start with curl to check the route, then use the same proxy in the tool that downloads code or packages. Scope credentials to the command or project that needs them.

Updated 2026-11-25 · 5 min read

Prepare the proxy credential

Request route through your static IP Command-line client your code proxy (HTTPS) Your server 203.0.113.42 from 203.0.113.42 Partner API / DB allows 203.0.113.42
Only the calls you send through the proxy use your static IP. Every other request goes out directly, as before.
  1. Log in to the client area, open My Services and click your server. Scroll to Use your IP from code, n8n, CI or a browser. Under Add a proxy user, type ci and click Add.
    MazeVPN client area: Add a proxy user, with the name ci typed in
    You should see: a new card named app-ci. Names can use letters and digits only, and MazeVPN adds the app- prefix.
  2. On that card, click Copy next to HTTPS proxy (marked Encrypted). The copied URL contains the password, so paste it only into a secret or environment variable, never into code.
    MazeVPN client area: the card of proxy user app-ci with its HTTPS, HTTP and SOCKS5 proxy URLs and Copy buttons
    The card of a new proxy user. The eye icon shows the password; Copy copies the full URL with the password. (Server IP replaced with an example.)
    You should see: a URL like https://app-ci:…@203.0.113.42:443, where the address is your server’s IP.
  3. Load MAZE_PROXY_URL, MAZE_PROXY_HOST and MAZE_PROXY_AUTH from your secret store. In these examples the host field is 203.0.113.42 and the auth field is app-ci:PASSWORD.
    You should see: The proxy URL uses the HTTPS endpoint and port 443. Keep credentials out of shell history, command tracing, and shared process arguments.

curl: check each address

curl -fsS --noproxy '*' https://api.ipify.org
curl -fsS -x "$MAZE_PROXY_URL" https://api.ipify.org
curl -fsS --proxy "https://$MAZE_PROXY_HOST:443" \
  --proxy-user "$MAZE_PROXY_AUTH" https://api.ipify.org
HTTPS_PROXY="$MAZE_PROXY_URL" curl -fsS https://api.ipify.org
curl -fsS --socks5-hostname "$MAZE_PROXY_HOST:1080" \
  --proxy-user "$MAZE_PROXY_AUTH" https://api.ipify.org
In a November 24, 2026 test in WSL, the first call returned the machine’s IPv4 and the following four returned the QA server’s IPv4. SOCKS5 hostname mode resolves names on the proxy. Curl’s explicit options can expose arguments to local process inspection.

Git: use HTTP configuration for HTTPS remotes

Use http.proxy for both HTTP and HTTPS remotes. The documented environment variable is https_proxy for HTTPS destinations. Git has no documented https.proxy configuration key. An SSH remote uses its SSH configuration.

Set http.proxyAuthMethod to basic when the proxy URL contains a username and password. Git’s default, anyauth, first sends the CONNECT request without credentials. If an HTTPS proxy closes the connection after its 407 reply, the libcurl retry fails with "Failed sending CONNECT to proxy". We saw this with Git 2.54 for Windows and Git 2.53 in WSL on November 24, 2026, and basic fixed it. MazeVPN servers now keep that connection open, so the default also worked in a November 25 retest. Basic remains a safe choice for any proxy. The GIT_HTTP_PROXY_AUTHMETHOD environment variable does the same when you use https_proxy.

Per Git docs, git config --global http.proxy sets a persistent default, and an http.<url>.proxy key limits the proxy to one remote. Keep real credentials out of shared Git configuration.

If a setup only allows SOCKS5, set MAZE_SOCKS_URL to socks5h://app-ci:PASSWORD@203.0.113.42:1080 and use it as http.proxy. The last command below returned HEAD in the same test. SOCKS5 sends proxy authentication unencrypted between your machine and the proxy, so prefer the HTTPS proxy.

git -c http.proxy="$MAZE_PROXY_URL" -c http.proxyAuthMethod=basic \
  ls-remote https://github.com/git/git.git HEAD
git -c "http.https://github.com/git/git.git.proxy=$MAZE_PROXY_URL" \
  -c "http.https://github.com/git/git.git.proxyAuthMethod=basic" \
  ls-remote https://github.com/git/git.git HEAD
https_proxy="$MAZE_PROXY_URL" GIT_HTTP_PROXY_AUTHMETHOD=basic \
  git ls-remote https://github.com/git/git.git HEAD
git -c http.proxy="$MAZE_SOCKS_URL" ls-remote https://github.com/git/git.git HEAD
A successful call prints the remote HEAD reference. Verify the exit IP with the curl check above.

npm and pip: scope the proxy to one command

npm uses https-proxy for HTTPS registry requests and proxy for HTTP requests. noproxy lists hosts to connect to directly. Per npm docs, npm config set proxy and npm config set https-proxy can persist the settings, and .npmrc values can interpolate an environment variable. Use a secret reference in a project file to keep the actual URL out of it.

Use these .npmrc entries when you need persistent project configuration: proxy=${MAZE_PROXY_URL}, https-proxy=${MAZE_PROXY_URL}, and noproxy=localhost,.internal on separate lines. The pip index command verifies access to the public package index without installing a package.

In the same WSL test, npm ping reached the registry using both the environment and project settings, pip listed versions from PyPI, and curl using the same HTTPS proxy URL returned the QA server’s IPv4.

HTTPS_PROXY="$MAZE_PROXY_URL" npm ping --registry=https://registry.npmjs.org/
python -m pip --proxy "$MAZE_PROXY_URL" index versions pip
Check the curl exit IP from the same environment. The npm and pip commands verify that their upstream endpoints respond.

Save npm settings for a disposable project

  1. Use a scratch project and npm config set to write environment-variable references to .npmrc. Single quotes keep the shell from expanding the secret while writing the file.
    npm config set 'proxy=${MAZE_PROXY_URL}' 'https-proxy=${MAZE_PROXY_URL}' \
      'noproxy=localhost,.internal' --location=project
    npm ping --registry=https://registry.npmjs.org/
    You should see: The file contains the variable reference. npm ping succeeds when the variable is set for the project.

Official references

Skip the setup

A dedicated IPv4 in 38 cities, usually ready about 3 minutes after payment. Connect devices with WireGuard and apps with an authenticated HTTPS, HTTP, or SOCKS5 proxy. From $9.99/month.

FAQ

Questions, answered.

Something else? Open a ticket, a human replies.

Does the proxy affect Git over SSH? +

Git HTTP proxy settings apply to HTTP(S) remotes. SSH uses its own connection configuration.

Why does the test still show my normal address? +

Check NO_PROXY and lowercase proxy variables, then try the explicit curl option.

Which proxy scheme should I use? +

Use HTTPS when the client supports it. Use SOCKS5 with proxy-side DNS when the tool and deployment require it.

Will npm or pip print the exit IP? +

The registry commands report reachability or package metadata. Use the curl check to verify the IP for the configured proxy.

Why does Git say "Failed sending CONNECT to proxy"? +

Set http.proxyAuthMethod=basic, or GIT_HTTP_PROXY_AUTHMETHOD=basic with https_proxy. Git’s default anyauth sends the first CONNECT request without credentials. Some HTTPS proxies close the connection after the 407 reply, and the libcurl retry does not recover.

What does MazeVPN cost for this? +

Solo is $9.99 a month with one dedicated IPv4 and three proxy users. See the pricing page.

More guides