Proxy Configuration
Configure Keeper Gateway to route traffic through corporate HTTP/HTTPS proxy servers for air-gapped or restricted network environments.
Overview
In enterprise environments, network security policies may require internet traffic to flow through a corporate proxy server. Keeper Gateway supports standard HTTP/HTTPS proxy configuration through environment variables and command-line parameters, ensuring compatibility with corporate network architectures.
When proxy support is enabled, the Gateway routes all outbound connections through the specified proxy server, including:
WebSocket connections to Keeper servers
HTTP/HTTPS API calls
Health check endpoints
Version verification requests
TURN credential requests
Supported Proxy Types
Keeper Gateway supports the following proxy configurations:
HTTP Proxy - Standard HTTP proxy servers (e.g., Squid, Apache Traffic Server)
HTTPS Proxy - Secure proxy connections with TLS
Authenticated Proxies - Proxies requiring username/password authentication
Bypass Lists - Exclude specific domains or IP addresses from proxy routing
Configuration Methods
You can configure proxy settings using either environment variables or command-line parameters. Command-line parameters take precedence over environment variables.
Option 1: Environment Variables
Environment variables provide a standard way to configure proxy settings across all network-aware applications. These variables are recognized by most networking tools and libraries.
Supported Environment Variables
Keeper Gateway recognizes the following environment variables (in order of precedence):
HTTPS_PROXYorhttps_proxy- Primary proxy configuration (recommended)HTTP_PROXYorhttp_proxy- Fallback proxy configurationNO_PROXYorno_proxy- Bypass list for excluded hosts
Setting Environment Variables
Linux/macOS:
export HTTPS_PROXY="http://proxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1,.local"Windows (Command Prompt):
set HTTPS_PROXY=http://proxy.company.com:8080
set NO_PROXY=localhost,127.0.0.1,.localWindows (PowerShell):
$env:HTTPS_PROXY="http://proxy.company.com:8080"
$env:NO_PROXY="localhost,127.0.0.1,.local"With Authentication
Include credentials in the proxy URL:
export HTTPS_PROXY="http://username:[email protected]:8080"Option 2: Command-Line Parameters
Command-line parameters provide additional flexibility and override environment variables when both are present.
Available Parameters
--proxy-url
Complete proxy URL with optional credentials
http://proxy.company.com:8080
--proxy-host
Proxy server hostname or IP address
proxy.company.com
--proxy-port
Proxy server port number
8080
--proxy-username
Authentication username (if required)
myuser
--proxy-password
Authentication password (if required)
mypassword
--no-proxy
Comma-separated list of hosts to bypass
localhost,127.0.0.1,.internal
Docker Deployment with Proxy
When deploying Keeper Gateway in Docker, configure proxy settings in your docker-compose.yml file.
Docker Compose Configuration
Add proxy environment variables to your Gateway service:
services:
keeper-gateway:
platform: linux/amd64
image: keepersecurityinc/gateway:latest
environment:
GATEWAY_CONFIG: <your-gateway-config>
# Proxy Configuration
HTTP_PROXY: http://proxy:3128
HTTPS_PROXY: http://proxy:3128
NO_PROXY: localhost,127.0.0.1,db-mysql,server-ssh,server-rdp
networks:
- internal-network
depends_on:
- proxyAir-Gapped Docker Environment Example
For complete network isolation, deploy the Gateway with a dedicated proxy container:
networks:
# Internal network with NO internet access
airgapped-internal-network:
internal: true
ipam:
config:
- subnet: 10.99.0.0/24
# Public network (proxy only)
public-internet-network:
driver: bridge
services:
# HTTP Proxy (bridges networks)
proxy:
platform: linux/amd64
image: ubuntu/squid:latest
networks:
- airgapped-internal-network
- public-internet-network
ports:
- "3128:3128"
volumes:
- ./squid.conf:/etc/squid/squid.conf:ro
# Keeper Gateway (air-gapped)
keeper-gateway:
platform: linux/amd64
image: keepersecurityinc/gateway:latest
environment:
GATEWAY_CONFIG: <your-gateway-config>
HTTP_PROXY: http://proxy:3128
HTTPS_PROXY: http://proxy:3128
NO_PROXY: localhost,127.0.0.1,internal-service
networks:
- airgapped-internal-network # NO public-internet-network
depends_on:
- proxyIn this configuration:
Gateway container has no direct internet access (only on
internal: truenetwork)All internet traffic must flow through the proxy container
Proxy container bridges the air-gapped and public networks
Internal services (databases, application servers) bypass the proxy
Configuration Priority
When multiple configuration sources are present, Keeper Gateway applies settings in the following priority order (highest to lowest):
Individual command-line parameters (
--proxy-host,--proxy-port, etc.)--proxy-urlcommand-line parameterHTTPS_PROXYenvironment variablehttps_proxyenvironment variableHTTP_PROXYenvironment variablehttp_proxyenvironment variable
For bypass lists:
--no-proxycommand-line parameterNO_PROXYenvironment variableno_proxyenvironment variable
Proxy URL Format
Proxy URLs follow standard URI syntax:
[scheme://][username:password@]hostname:portExamples
Basic HTTP proxy:
http://proxy.company.com:8080HTTPS proxy:
https://proxy.company.com:8080Authenticated proxy:
http://username:[email protected]:8080Proxy with special characters in password:
http://user:p%40ssw0rd%[email protected]:8080Note: URL-encode special characters in usernames and passwords using percent-encoding (e.g.,
@becomes%40,!becomes%21).
NO_PROXY Bypass List
The NO_PROXY setting allows you to exclude specific hosts from proxy routing. This is useful for:
Internal services on the same network
Local resources that don't require proxy access
Services that cannot work through a proxy
Bypass List Format
The bypass list is a comma-separated list of:
Exact hostnames:
localhost,internal-serverIP addresses:
127.0.0.1,192.168.1.100Domain suffixes:
.internal.com,.local(matches all subdomains)
Examples
Basic bypass list:
NO_PROXY=localhost,127.0.0.1With domain suffixes:
NO_PROXY=localhost,127.0.0.1,.corp.internal,.localDocker internal services:
NO_PROXY=localhost,127.0.0.1,db-mysql,server-ssh,server-rdp,server-vncVerification and Testing
Step 1: Verify Configuration
After starting the Gateway with proxy configuration, check the logs for confirmation:
INFO - Applying proxy configuration: proxy.company.com:8080
INFO - Using proxy for WebSocket: proxy.company.com:8080Step 2: Test Proxy Connectivity
Before starting the Gateway, verify proxy accessibility:
Linux/macOS:
curl -x http://proxy.company.com:8080 https://keepersecurity.comWindows (PowerShell):
Invoke-WebRequest -Uri https://keepersecurity.com -Proxy http://proxy.company.com:8080If the proxy requires authentication:
curl -x http://username:[email protected]:8080 https://keepersecurity.comLast updated
Was this helpful?

