Environment Variables
Using environment variables to establish a connection to the Qpoint Proxy is a simple and effective way to configure applications to route their traffic through the proxy. This method allows you to set proxy configurations globally or for specific applications, ensuring that all outbound traffic is properly routed and managed by the proxy.
Shell
Before starting your application, you can set the environment variables in your shell. This method applies the proxy settings for the duration of the shell session or until the variables are unset.
You can also set these variables in your shell configuration file (e.g., .bashrc
, .zshrc
) to make them persistent across sessions:
Docker
When running applications inside Docker containers, you can set environment variables in the Dockerfile or via the docker run
command.
Dockerfile Configuration:
Docker Run Command:
Kubernetes
If your application supports environment variables for proxies, you can update your pod spec to set these variables:
Apply the configuration:
Python
Python applications using the requests
library can be configured to use the proxy with environment variables:
Ensure the environment variables are set before running the script:
Java
Java applications can use the java.net
package to pick up proxy settings from environment variables:
Alternatively, you can use JVM arguments:
Node.js
Node.js applications can leverage the global-tunnel-ng
package to utilize environment variables for proxy settings:
Ensure the environment variables are set before running the Node.js application:
Last updated