Overview
The CLI Proxy API server configuration controls how the proxy binds to network interfaces, handles TLS encryption, and manages logging behavior.Network Settings
Server host/interface to bind to. Default is empty (
"") to bind all interfaces (IPv4 + IPv6).Common values:""- Bind to all interfaces (default)"127.0.0.1"or"localhost"- Restrict access to local machine only- Specific IP address - Bind to a particular network interface
Server port number for the API server.Example:
TLS Configuration
TLS settings for HTTPS. When enabled, the server listens with the provided certificate and key.
TLS Example
Logging Configuration
Enable debug logging for detailed diagnostics.When enabled:
- Verbose request/response logging
- Detailed error traces
- Performance metrics
Debug mode may expose sensitive information. Use only in development or troubleshooting.
When true, write application logs to rotating files instead of stdout.Log location:
./logs/ directory in the working directoryExample:Maximum total size (MB) of log files under the logs directory. When exceeded, the oldest log files are deleted until within the limit.Values:
0- Unlimited (default)- Positive integer - Size limit in megabytes
Maximum number of error log files retained when request logging is disabled. When exceeded, the oldest error log files are deleted.Values:
0- Disable cleanup- Positive integer - Maximum number of files
Performance Settings
When true, disable high-overhead HTTP middleware features to reduce per-request memory usage under high concurrency.Impact:
- Reduced memory footprint
- Disabled detailed request tracking
- Optimized for high-throughput scenarios
When false, disable in-memory usage statistics aggregation.Example:
Debug Server (pprof)
Enable pprof HTTP debug server for profiling and diagnostics.
pprof Example
http://127.0.0.1:8316/debug/pprof/- Indexhttp://127.0.0.1:8316/debug/pprof/heap- Memory profilinghttp://127.0.0.1:8316/debug/pprof/goroutine- Goroutine profiling
Complete Server Configuration Example
Best Practices
Development vs Production:
- Development: Use
host: "127.0.0.1",debug: true,logging-to-file: false - Production: Use
host: "",debug: false,logging-to-file: true,commercial-mode: true