In cmd.exe, write the assignment without spaces around the equals sign:

set "HTTP_PROXY=http://proxy.example:8080"

This superficially similar command creates a different result:

set HTTP_PROXY = http://proxy.example:8080

The name now has a trailing space, and the value begins with one. An application looking up HTTP_PROXY is not asking for HTTP_PROXY . A displayed assignment can look almost right while the intended lookup remains empty.

Quoting the whole assignment also avoids accidentally including trailing blanks in the value. Quoting only the value is a different form and can leave quote characters in the stored value.

Replace the example listener with an HTTP endpoint from your service or the HTTP proxy list. Run the intended client from that command window so it inherits the variable. An application already running elsewhere does not acquire the new environment.

This is cmd.exe syntax. PowerShell uses an environment-variable assignment such as $env:HTTP_PROXY = 'http://proxy.example:8080'; in PowerShell, the spaces in that expression are not the same mistake. The program must still support the variable and proxy protocol being supplied.

Mikanda mikatakata