Proxy Settings¶
Configure Agentomics-ML to work behind corporate proxies and firewalls.
Environment Variables¶
Set these variables for proxy access:
| Variable | Description | Example |
|---|---|---|
HTTP_PROXY |
HTTP proxy URL | http://proxy.company.com:8080 |
HTTPS_PROXY |
HTTPS proxy URL | http://proxy.company.com:8080 |
NO_PROXY |
Hosts to bypass | localhost,127.0.0.1,.internal |
Setting Variables¶
Export in shell:
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1
Or in .env file:
HTTP_PROXY=http://proxy.company.com:8080
HTTPS_PROXY=http://proxy.company.com:8080
NO_PROXY=localhost,127.0.0.1
Docker Configuration¶
Docker requires separate proxy configuration.
Configure Docker Daemon¶
Create or edit the proxy configuration:
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
Add:
[Service]
Environment="HTTP_PROXY=http://proxy.company.com:8080"
Environment="HTTPS_PROXY=http://proxy.company.com:8080"
Environment="NO_PROXY=localhost,127.0.0.1"
Apply Changes¶
Verify Configuration¶
Building Images with Proxy¶
Pass proxy settings as build arguments:
docker build \
--build-arg HTTP_PROXY=$HTTP_PROXY \
--build-arg HTTPS_PROXY=$HTTPS_PROXY \
--build-arg http_proxy=$http_proxy \
--build-arg https_proxy=$https_proxy \
-t agentomics .
build.sh does not pass proxy build args explicitly. If you need to enforce
proxy settings for builds, use the manual docker build commands above or
ensure your Docker daemon is configured with the proxy.
Running with Proxy¶
The run.sh script automatically passes proxy settings to containers.
If running manually:
docker run \
-e HTTP_PROXY=$HTTP_PROXY \
-e HTTPS_PROXY=$HTTPS_PROXY \
-e NO_PROXY=$NO_PROXY \
agentomics_img
Checking Proxy Variables¶
Verify your proxy settings:
Common Proxy Formats¶
# Basic
HTTP_PROXY=http://proxy.company.com:8080
# With authentication
HTTP_PROXY=http://username:password@proxy.company.com:8080
# SOCKS proxy
HTTP_PROXY=socks5://proxy.company.com:1080
API-Specific Proxies¶
Different APIs may need different proxy settings:
# For LLM APIs
HTTPS_PROXY=http://proxy.company.com:8080
# Bypass for internal services
NO_PROXY=localhost,127.0.0.1,internal.company.com
Troubleshooting¶
Connection timeouts¶
Verify proxy is accessible:
Certificate errors¶
Some proxies perform SSL inspection. You may need to:
- Add the corporate CA certificate to the container
- Or set
REQUESTS_CA_BUNDLEenvironment variable
Docker can't pull images¶
Ensure Docker daemon proxy is configured (not just shell environment).
LLM API calls fail¶
Check that the proxy allows connections to:
- api.openai.com
- api.anthropic.com
- openrouter.ai
Add to NO_PROXY if these should bypass the proxy.
Local Mode¶
In local mode (--local), proxy settings are inherited from your shell environment automatically.