๐ข Enterprise & Proxy Setup Guide
January 6, 2026 ยท View on GitHub
NeuroLink provides comprehensive proxy support for enterprise environments, enabling AI integration behind corporate firewalls and proxy servers.
โจ Zero Configuration Proxy Support
NeuroLink automatically detects and uses proxy settings when environment variables are configured. No code changes required.
Quick Setup
# Set proxy environment variables
export HTTPS_PROXY=http://your-corporate-proxy:port
export HTTP_PROXY=http://your-corporate-proxy:port
# NeuroLink will automatically use these settings
npx @juspay/neurolink generate "Hello from behind corporate proxy"
๐ง Environment Variables
Required Proxy Variables
| Variable | Description | Example |
|---|---|---|
HTTPS_PROXY | Proxy server for HTTPS requests | http://proxy.company.com:8080 |
HTTP_PROXY | Proxy server for HTTP requests | http://proxy.company.com:8080 |
Optional Proxy Variables
| Variable | Description | Default |
|---|---|---|
NO_PROXY | Domains to bypass proxy | localhost,127.0.0.1 |
๐ Provider-Specific Proxy Support
โ Full Proxy Support
All NeuroLink providers automatically work through corporate proxies:
| Provider | Proxy Method | Status |
|---|---|---|
| Anthropic Claude | Direct fetch calls with proxy | โ Verified + Tested |
| OpenAI | Global fetch handling | โ Verified + Tested |
| Google Vertex AI | Custom fetch with undici ProxyAgent | โ Verified + Tested |
| Google AI Studio | Custom fetch with undici ProxyAgent | โ Verified + Tested |
| Mistral AI | Custom fetch with undici ProxyAgent | โ Verified + Tested |
| Ollama | Custom fetch with undici ProxyAgent | โ Verified + Tested |
| HuggingFace | Custom fetch with undici ProxyAgent | โ Implemented |
| Azure OpenAI | Custom fetch with undici ProxyAgent | โ Implemented |
| Amazon Bedrock | Global fetch handling | โ Implemented |
๐ Quick Validation
Test Proxy Configuration
# 1. Set proxy variables
export HTTPS_PROXY=http://your-proxy:port
export HTTP_PROXY=http://your-proxy:port
# 2. Test with any provider
npx @juspay/neurolink generate "Test proxy connection" --provider google-ai
# 3. Check proxy logs for connection intercepts
Verify Proxy Usage
When proxy is working correctly, you should see:
- โ AI responses generated successfully
- โ Proxy server logs showing intercepted connections
- โ No direct internet access required
- โ Enterprise MCP tools work alongside proxy
Enterprise Grade Testing
NeuroLink includes comprehensive proxy validation tests:
# Run enterprise proxy tests
npm test -- test/proxy/proxySupport.test.ts
# Test all providers with proxy + MCP
npm test -- test/proxy/proxySupport.test.ts --run
Test Coverage:
- โ Proxy usage validation (negative/positive testing)
- โ All enterprise providers (Anthropic, OpenAI, Vertex, Mistral, Ollama)
- โ MCP + Proxy compatibility (enterprise grade)
- โ Real-world timeout handling
- โ SDK and CLI interface testing
๐ Enterprise Configuration Examples
Corporate Firewall Setup
# Standard corporate proxy
export HTTPS_PROXY=http://proxy.company.com:8080
export HTTP_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1,.company.com
Authenticated Proxy
# Proxy with authentication
export HTTPS_PROXY=http://username:password@proxy.company.com:8080
export HTTP_PROXY=http://username:password@proxy.company.com:8080
Multiple Environment Setup
# Development environment
export HTTPS_PROXY=http://dev-proxy.company.com:8080
# Production environment
export HTTPS_PROXY=http://prod-proxy.company.com:8080
๐ ๏ธ Technical Implementation
Architecture Overview
NeuroLink uses the undici ProxyAgent for reliable proxy support:
// Automatic proxy detection and configuration
const proxyFetch = createProxyFetch();
// Provider integration varies by SDK capabilities:
// - Custom fetch parameter (Google AI, Vertex AI)
// - Direct fetch calls (Anthropic)
// - Global fetch handling (OpenAI, Bedrock)
Key Benefits
- ๐ Automatic Detection - Zero configuration for standard setups
- ๐ข Enterprise Ready - Works with corporate authentication
- โก High Performance - Optimized undici implementation
- ๐ก๏ธ Security Compliant - Respects corporate security policies
๐ง Troubleshooting
Common Issues
Proxy Not Working
# Check environment variables
echo $HTTPS_PROXY
echo $HTTP_PROXY
# Verify proxy server accessibility
curl -I --proxy $HTTPS_PROXY https://api.openai.com
Connection Timeouts
# Increase timeout for slow proxies
export NEUROLINK_TIMEOUT=60000 # 60 seconds
Authentication Issues
# URL encode special characters in credentials
# @ becomes %40, : becomes %3A
export HTTPS_PROXY=http://user%40domain.com:pass%3Aword@proxy:8080
Debug Mode
# Enable detailed proxy logging
export DEBUG=neurolink:proxy
npx @juspay/neurolink generate "Debug proxy connection" --debug
๐ AWS & Cloud Deployment
AWS Corporate Environment
# Set in AWS Lambda environment variables
HTTPS_PROXY=http://corporate-proxy.amazonaws.com:8080
HTTP_PROXY=http://corporate-proxy.amazonaws.com:8080
Docker Deployment
# Dockerfile
ENV HTTPS_PROXY=http://proxy.company.com:8080
ENV HTTP_PROXY=http://proxy.company.com:8080
RUN npm install @juspay/neurolink
Kubernetes Configuration
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: neurolink-app
env:
- name: HTTPS_PROXY
value: "http://proxy.company.com:8080"
- name: HTTP_PROXY
value: "http://proxy.company.com:8080"
๐ Checklist for Enterprise Deployment
Pre-deployment
- Proxy server details obtained from IT team
- Network connectivity tested with curl/wget
- Authentication credentials secured
- Firewall rules configured for AI provider domains
Testing
- Environment variables set correctly
- NeuroLink proxy test successful
- All required providers accessible
- Production environment validated
Security
- Proxy credentials stored securely
- NO_PROXY configured for internal services
- SSL/TLS verification enabled
- Logging configured appropriately
๐ Related Documentation
- Provider Configuration - Detailed provider setup
- CLI Guide - Command line proxy usage
- Environment Variables - Complete variable reference
- Troubleshooting - Common issues and solutions
Enterprise Support: For enterprise deployment assistance, contact enterprise@juspay.in