Releases: scharf/node-proxy-bridge
Releases · scharf/node-proxy-bridge
2025-08-02 security updates
2025-08-01 node-proxy-bridge
node-proxy-bridge v1.0 Release Notes
Overview
node-proxy-bridge v1.0 is the initial release of a solution to work around a critical issue in Node.js 20.12+ where the native fetch() API no longer respects HTTP_PROXY/HTTPS_PROXY environment variables. This breaks applications running in corporate networks that require proxy servers.
Key Features
- Simple URL Prefix Solution: Just prefix your URLs with the proxy address (e.g.,
http://localhost:8666/api.github.com/user) - Corporate Proxy Support: Automatically routes requests through corporate proxies using environment variables
- Streaming Support: Handles streaming responses (essential for LLM APIs and other streaming services)
- Docker Ready: Easy deployment with Docker and Docker Compose
- Configurable SSL Verification: Options to handle corporate SSL inspection
- Detailed Logging: Configurable logging levels for troubleshooting
Installation
Docker (Recommended)
docker run -d -p 8666:8666 \
-e HTTPS_PROXY=http://corp-proxy:3128 \
scharf/node-proxy-bridgeDocker Compose
version: '3.8'
services:
node-proxy-bridge:
image: scharf/node-proxy-bridge
ports:
- "8666:8666"
environment:
- HTTPS_PROXY=http://corp-proxy:3128
- HTTP_PROXY=http://corp-proxy:3128
- NO_PROXY=localhost,127.0.0.1
restart: unless-stoppedUsage
Basic Usage
http://localhost:8666/api.openai.com/v1/chat/completions
Disable Streaming
http://localhost:8666/proxy-no-streaming/api.example.com/endpoint
In Node.js Applications
// Instead of this (which doesn't work in Node.js 20.12+):
// const response = await fetch('https://api.example.com/data');
// Do this (which works with the proxy):
const apiBaseUrl = process.env.API_BASE_URL || 'http://localhost:8666/api.example.com';
const response = await fetch(`${apiBaseUrl}/data`);Configuration Options
| Environment Variable | Description | Default |
|---|---|---|
HTTPS_PROXY |
Corporate proxy URL | - |
HTTP_PROXY |
Corporate proxy URL | - |
NO_PROXY |
Domains to bypass | - |
PROXY_VERIFY_SSL |
Enable SSL verification | false |
PROXY_CA_BUNDLE |
Path to CA bundle | - |
LOG_LEVEL |
Logging verbosity | INFO |
Security Notes
- SSL verification is disabled by default to work with corporate proxies that do SSL inspection
- For production use outside corporate networks, enable SSL verification:
docker run -d -p 8666:8666 -e PROXY_VERIFY_SSL=true scharf/node-proxy-bridge
Technical Details
- Built with FastAPI (v0.110.0), httpx (v0.27.0), and uvicorn (v0.27.0)
- Python 3.11-based Docker image
- Exposed port: 8666
Known Issues
- This is a workaround for a known issue in Node.js 20.12+ where the native fetch API no longer respects proxy environment variables
- Related issues:
License
node-proxy-bridge is released under the MIT License. See the LICENSE file for details.
Acknowledgments
Thanks to the community for reporting and discussing the Node.js proxy issues that led to the creation of this tool.