Proxy Configuration Network
Configure network proxy for API access.
Basic Configuration
yaml
proxy:
enabled: true
type: http # http, socks5
host: 127.0.0.1
port: 7890Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable proxy |
type | string | http | Proxy type |
host | string | 127.0.0.1 | Proxy host |
port | number | 7890 | Proxy port |
username | string | - | Auth username |
password | string | - | Auth password |
noProxy | array | [] | Bypass list |
Proxy Types
HTTP Proxy
yaml
proxy:
enabled: true
type: http
host: 127.0.0.1
port: 7890SOCKS5 Proxy
yaml
proxy:
enabled: true
type: socks5
host: 127.0.0.1
port: 1080With Authentication
yaml
proxy:
enabled: true
type: http
host: proxy.example.com
port: 8080
username: user
password: ${PROXY_PASSWORD}Bypass List
Domains that should bypass proxy:
yaml
proxy:
enabled: true
type: http
host: 127.0.0.1
port: 7890
noProxy:
- localhost
- 127.0.0.1
- api.deepseek.com # Domestic APIEnvironment Variables
Alternative to config file:
bash
export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
export NO_PROXY=localhost,127.0.0.1Per-Channel Proxy
yaml
channels:
- name: openai
baseUrl: https://api.openai.com/v1
proxy:
enabled: true
host: 127.0.0.1
port: 7890
- name: deepseek
baseUrl: https://api.deepseek.com
proxy:
enabled: false # No proxy neededTesting Proxy
bash
# Test HTTP proxy
curl -x http://127.0.0.1:7890 https://api.openai.com/v1/models
# Test SOCKS5 proxy
curl -x socks5://127.0.0.1:1080 https://api.openai.com/v1/modelsTroubleshooting
| Issue | Solution |
|---|---|
| Connection timeout | Check proxy is running |
| Auth failed | Verify username/password |
| Some requests fail | Check noProxy list |
Next Steps
- Channels - Channel configuration
- Troubleshooting - Common issues