Skip to main content

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.

The naive binary accepts configuration either as command-line flags or as a JSON config file. Every option documented here corresponds directly to a key in the JSON config file. Flags take precedence over config file values when both are supplied. You can also specify the same flag multiple times on the command line — this is equivalent to providing an array of strings for that key in the JSON file.

Usage Synopsis

naive --listen=... --proxy=...
naive [/path/to/config.json]

Connection Options

--listen
LISTEN-URI
required
Listens for incoming proxy connections at the specified address and port using the given protocol.URI format:
<LISTEN-PROTO>://[<USER>:<PASS>@][<ADDR>][:<PORT>]
Supported protocols (LISTEN-PROTO):
ValueDescription
socksSOCKS5 proxy listener
httpHTTP CONNECT proxy listener
redirTransparent redirect listener (Linux iptables)
Defaults: protocol socks, address 0.0.0.0, port 1080.This flag can be specified multiple times to listen on multiple ports simultaneously. When multiple listen URIs are given, the number of --proxy values must match, and each listener is paired with the proxy at the same position.
The redir protocol operates without authentication and requires iptables rules to redirect traffic into naive. It also activates a built-in DNS resolver on the same UDP port, which returns artificial addresses that are translated back to original domain names inside proxy requests and then resolved remotely. These artificial results are not saved for privacy — restarting the resolver may cause downstream clients to cache stale results.
iptables rules for redirecting locally originated traffic:
iptables -t nat -A OUTPUT -d $proxy_server_ip -j RETURN
iptables -t nat -A OUTPUT -p tcp -j REDIRECT --to-ports 1080
iptables rules for redirecting forwarded traffic on a router:
iptables -t nat -A PREROUTING -p tcp -j REDIRECT --to-ports 1080
--proxy
PROXY
Routes outgoing traffic through the specified proxy or proxy chain.Grammar:
PROXY        = PROXY-CHAIN | SOCKS-PROXY
PROXY-CHAIN  = <PROXY-URI>[,<PROXY-CHAIN>]
PROXY-URI    = <PROXY-PROTO>://[<USER>:<PASS>@]<HOSTNAME>[:<PORT>]
PROXY-PROTO  = "http" | "https" | "quic"
SOCKS-PROXY  = socks://<HOSTNAME>[:<PORT>]
Supported proxy protocols (PROXY-PROTO):
ValueDescription
httpsHTTP/2 CONNECT proxy over TLS — standard NaïveProxy transport
quicHTTP/3 CONNECT proxy over QUIC — alternative NaïveProxy transport
httpPlain HTTP CONNECT proxy (no TLS)
socksSOCKS5 proxy (no chaining, authentication, or Naive padding)
Default: direct connection (no proxying).The last PROXY-URI in a chain is automatically negotiated for NaïveProxy padding. Multiple proxy URIs can be chained with commas to form a multi-hop route.When multiple --proxy values are provided, they must match the number of --listen URIs exactly, and each listener is routed to the proxy at the same positional index.Limitations:
  • QUIC proxies cannot follow TCP-based proxies in a chain.
  • You must ensure there are no loops in the proxy chain.
  • SOCKS proxies do not support chaining, authentication, or NaïveProxy padding.

Concurrency and Timeout Options

--insecure-concurrency weakens NaïveProxy’s traffic-analysis resistance. Using more than one tunnel connection makes your traffic easier to fingerprint and detect. This project is built for strong security against traffic analysis — using this option in a high-value environment defeats that purpose.
--insecure-concurrency
integer
default:"1"
Opens N concurrent tunnel connections for a single proxy session, which can improve robustness on unreliable networks.Default: 1 (single connection).Every additional connection increases the detectability of your traffic. If you are experiencing reliability issues, try N=2 first before increasing further. Using more than 4 connections is strongly discouraged.
--tunnel-timeout
integer (seconds)
default:"1800 (600 on Android)"
The maximum lifetime of a single tunnel connection. Once a tunnel connection reaches this age it is retired: new streams are opened on fresh connections, and any streams still running on the retired connection are forcibly closed either by the idle timeout (if idle) or by the tunnel timeout (if still active). The retired connection is finally closed once all its tunneled streams have been closed.This helps with CGNAT environments where long-lived connections get stuck, but will break long-lived TCP protocols such as SSH.Default: 1800 seconds (30 minutes); 600 seconds (10 minutes) on Android.
--idle-timeout
integer (seconds)
default:"600 (300 on Android)"
The maximum time a tunneled stream can remain idle. Streams idle beyond this threshold are forcibly closed, enabling timely cleanup of retired connections. When a stream has been silent long enough, it is assumed unused and the forced closure is considered a mild disruption.Default: 600 seconds (10 minutes); 300 seconds (5 minutes) on Android.

Request and Resolver Options

--extra-headers
string
Appends one or more extra HTTP headers to every request sent to the proxy server. When supplying multiple headers, separate each header with CRLF (\r\n).Example:
--extra-headers="X-Custom-Header: value"
--host-resolver-rules
string
Statically resolves a domain name to a fixed IP address, bypassing DNS. Useful when the proxy server hostname cannot be resolved through normal DNS.Example:
--host-resolver-rules="MAP proxy.example.com 1.2.3.4"
--resolver-range
CIDR
default:"100.64.0.0/10"
Sets the IP address range used by the built-in DNS resolver (activated when using the redir listen protocol). The resolver allocates artificial addresses from this range and maps them back to domain names inside proxy requests.Default: 100.64.0.0/10 (IANA Shared Address Space).

Logging and Diagnostic Options

--log
path
default:"(none)"
Enables logging output. If a file path is provided, the log is written to that file. If the path is empty (--log=), the log is printed to the console.Default: no log is saved or printed, for privacy.
# Print log to console
naive --log= --listen=socks://127.0.0.1:1080 --proxy=https://user:pass@example.com

# Save log to a file
naive --log=/var/log/naive.log --listen=socks://127.0.0.1:1080 --proxy=https://user:pass@example.com
--log-net-log
path
Saves a Chromium NetLog capture to the specified file path. NetLog files record low-level network events and are useful for debugging connection issues.View the captured file at https://netlog-viewer.appspot.com/.
naive --log-net-log=/tmp/netlog.json --listen=socks://127.0.0.1:1080 --proxy=https://user:pass@example.com
--ssl-key-log-file
path
Saves TLS session keys to the specified file in NSS Key Log format. The key log can be loaded into Wireshark to decrypt and inspect TLS traffic for debugging.
naive --ssl-key-log-file=/tmp/ssl-keys.log --listen=socks://127.0.0.1:1080 --proxy=https://user:pass@example.com

Security Options

--no-post-quantum
flag
Disables the X25519Kyber768 post-quantum key agreement algorithm. Post-quantum key exchange is enabled by default to protect against future quantum-computer-based decryption of recorded traffic. Use this flag only if you are experiencing compatibility issues with your proxy server.

General Options

--version
flag
Prints the naive version string and exits. Always use the latest release — keeping the version current ensures TLS fingerprints remain identical to the current Chrome release.
-h, --help
flag
Prints the usage help message and exits.

Build docs developers (and LLMs) love