Documentation Index
Fetch the complete documentation index at: https://mintlify.com/klzgrad/naiveproxy/llms.txt
Use this file to discover all available pages before exploring further.
naive can be configured either via command-line flags or a JSON configuration file. The JSON format is the recommended approach for persistent deployments because it keeps all settings in one place and integrates cleanly with process managers. Every JSON field maps directly to its corresponding CLI flag — just strip the -- prefix from any flag name to get the JSON key.
Config File Basics
By default,naive looks for a file named config.json in the current working directory when run with no arguments:
Precedence: Command-line flags always override values set in the config file. You can use a config file as a base and selectively override individual fields at runtime with flags.
Config File Fields
The address(es) and protocol(s) on which
Defaults: protocol
naive listens for incoming connections.Format: <LISTEN-PROTO>://[<USER>:<PASS>@][<ADDR>][:<PORT>]Accepted LISTEN-PROTO values: socks, http, redir.Defaults: protocol
socks, address 0.0.0.0, port 1080.Provide a single string for one listener or an array of strings for multiple listeners. When using multiple listeners, the number of proxy entries must match, paired by position.See —listen for full details including redir iptables setup.The proxy or proxy chain through which outgoing traffic is routed.Format:
Accepted
Multiple hops can be chained with commas in a single string.Default: direct connection (no proxying).When set to an array, the number of entries must match the number of
<PROXY-PROTO>://[<USER>:<PASS>@]<HOSTNAME>[:<PORT>]Accepted
PROXY-PROTO values: https, quic, http, socks.Multiple hops can be chained with commas in a single string.Default: direct connection (no proxying).When set to an array, the number of entries must match the number of
listen entries — each listener is routed to its positionally paired proxy.See —proxy for full grammar, protocol notes, and limitations.Number of concurrent tunnel connections to open per session. Increasing this value can help with unreliable networks but reduces security by making traffic easier to fingerprint.Try
2 first if you need more than the default. Values above 4 are strongly discouraged.Equivalent CLI flag: --insecure-concurrencyLifetime of a tunnel connection in seconds. After this timeout the connection is retired — new streams use new connections, and existing streams are closed when they become idle or their own timeout expires.Helps with CGNAT but breaks long-lived protocols like SSH.Equivalent CLI flag:
--tunnel-timeoutMaximum idle time for a tunneled stream in seconds. Streams idle beyond this threshold are forcibly closed to enable timely cleanup of retired connections.Equivalent CLI flag:
--idle-timeoutExtra HTTP headers to append to every proxy server request. Separate multiple headers with CRLF.Equivalent CLI flag:
--extra-headersStatically maps a domain name to an IP address, bypassing DNS resolution for that hostname.Equivalent CLI flag:
--host-resolver-rulesThe IP address range allocated by the built-in DNS resolver (active when using the
redir listen protocol).Equivalent CLI flag: --resolver-rangePath to a log file. Set to an empty string
"" to print logs to the console instead of a file. Omitting this field entirely disables all logging for privacy.Equivalent CLI flag: --logPath to save a Chromium NetLog capture. View the file at https://netlog-viewer.appspot.com/.Equivalent CLI flag:
--log-net-logPath to save TLS session keys in NSS Key Log format for Wireshark inspection.Equivalent CLI flag:
--ssl-key-log-fileSet to
true to disable X25519Kyber768 post-quantum key agreement. Post-quantum is enabled by default. Only disable this if you encounter compatibility issues with your server.Equivalent CLI flag: --no-post-quantumComplete Examples
- Full config (all fields)
- Minimal — HTTPS transport
- Minimal — QUIC transport
- Multiple listeners
- Proxy chain
A reference config showing every available field:
Field Summary Table
| JSON Key | CLI Flag | Type | Default |
|---|---|---|---|
listen | --listen | string | string[] | socks://0.0.0.0:1080 |
proxy | --proxy | string | string[] | direct (none) |
insecure-concurrency | --insecure-concurrency | integer | 1 |
tunnel-timeout | --tunnel-timeout | integer (s) | 1800 (600 Android) |
idle-timeout | --idle-timeout | integer (s) | 600 (300 Android) |
extra-headers | --extra-headers | string | — |
host-resolver-rules | --host-resolver-rules | string | — |
resolver-range | --resolver-range | string (CIDR) | 100.64.0.0/10 |
log | --log | string | — (no logging) |
log-net-log | --log-net-log | string | — |
ssl-key-log-file | --ssl-key-log-file | string | — |
no-post-quantum | --no-post-quantum | boolean | false |