mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
Update USAGE.txt
This commit is contained in:
parent
8f5b1e4611
commit
a3a09a9322
78
USAGE.txt
78
USAGE.txt
@ -1,25 +1,20 @@
|
|||||||
Usage: naive { OPTIONS | [/path/to/config.json] }
|
Usage: naive --listen=... --proxy=...
|
||||||
|
naive [/path/to/config.json]
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
|
|
||||||
naive is a proxy to transport traffic as Chromium traffic. It can be
|
naive is a proxy that transports traffic in Chromium's pattern.
|
||||||
used as both the client and the server or together.
|
It works as both a proxy client and a proxy server or together.
|
||||||
|
|
||||||
There are two ways to specify options. The first is through command
|
Options in the form of `naive --listen=... --proxy=...` can also be
|
||||||
line flags: naive OPTIONS. The second is through a JSON
|
specified using a JSON file:
|
||||||
configuration file. If there are no command line flags or path
|
|
||||||
specified, it will try to read from "config.json" by default.
|
|
||||||
|
|
||||||
The syntax of config.json fields are mapped exactly to command line
|
|
||||||
flags, e.g.
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"proxy": "https://user:pass@example.org"
|
"listen": "...",
|
||||||
|
"proxy": "..."
|
||||||
}
|
}
|
||||||
|
|
||||||
is exactly the same as --proxy=https://user:pass@example.org. All
|
Uses "config.json" by default if run without arguments.
|
||||||
command line flags must have string values in config.json, except if
|
|
||||||
the flags are boolean then they must have boolean values too.
|
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
@ -29,45 +24,56 @@ Options:
|
|||||||
|
|
||||||
--version
|
--version
|
||||||
|
|
||||||
Prints version
|
Prints version.
|
||||||
|
|
||||||
--listen=<proto>://[addr][:port]
|
--listen=<proto>://[addr][:port]
|
||||||
|
|
||||||
Listens at addr:port with protocol <proto>. Allowed values for
|
Listens at addr:port with protocol <proto>.
|
||||||
proto: "socks", "http", "redir". The default proto is socks.
|
|
||||||
The default addr is 0.0.0.0. The default port is 1080.
|
|
||||||
|
|
||||||
For redirecting local traffic from the same machine:
|
Available proto: socks, http, redir.
|
||||||
|
Default proto, addr, port: socks, 0.0.0.0, 1080.
|
||||||
|
|
||||||
iptables -t nat -A OUTPUT -p tcp -d ... -j REDIRECT --to-ports 1080
|
* http: Supports only proxying https:// URLs, no http://.
|
||||||
|
|
||||||
For redirecting forwarded traffic on a router:
|
* redir: Works with certain iptables setup.
|
||||||
|
|
||||||
iptables -t nat -A PREROUTING -p tcp -d ... -j REDIRECT --to-ports 1080
|
(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
|
||||||
|
|
||||||
--proxy=<proto>://[<user>:<pass>@]<hostname>[:<port>]
|
(Redirecting forwarded traffic on a router)
|
||||||
|
iptables -t nat -A PREROUTING -p tcp -j REDIRECT --to-ports 1080
|
||||||
|
|
||||||
Routes traffic via the proxy server. Allowed values for proto:
|
Also activates a DNS resolver on the same UDP port. Similar iptables
|
||||||
"https", "quic". The value of port is inferred from proto if not
|
rules can redirect DNS queries to this resolver. The resolver returns
|
||||||
specified.
|
artificial addresses that are translated back to the original domain
|
||||||
|
names in proxy requests and then resolved remotely.
|
||||||
|
|
||||||
If this option is not set, connects to origin server directly.
|
The artificial results are not saved for privacy, so restarting the
|
||||||
|
resolver may cause downstream to cache stale results.
|
||||||
|
|
||||||
--padding
|
--proxy=<proto>://<user>:<pass>@<hostname>[:<port>]
|
||||||
|
|
||||||
Obfuscates traffic by adding length paddings.
|
Routes traffic via the proxy server. Connects directly by default.
|
||||||
|
Available proto: https, quic. Infers port by default.
|
||||||
|
|
||||||
--host-resolver-rules=...
|
--extra-headers=...
|
||||||
|
|
||||||
This is the same as Chromium's flag of the same name. Google it
|
Appends extra headers in requests to the proxy server.
|
||||||
as the full description is too technical.
|
Multiple headers are separated by CRLF.
|
||||||
|
|
||||||
|
--host-resolver-rules="MAP proxy.example.com 1.2.3.4"
|
||||||
|
|
||||||
|
Statically resolves a domain name to an IP address.
|
||||||
|
|
||||||
|
--resolver-range=CIDR
|
||||||
|
|
||||||
|
Uses this range in the builtin resolver. Default: 100.64.0.0/10.
|
||||||
|
|
||||||
--log=[<path>]
|
--log=[<path>]
|
||||||
|
|
||||||
Saves log to the file at <path>. If <path> is empty, prints to
|
Saves log to the file at <path>. If path is empty, prints to
|
||||||
console.
|
console. No log is saved or printed by default for privacy.
|
||||||
|
|
||||||
If this option is not set, no log is saved for privacy.
|
|
||||||
|
|
||||||
--log-net-log=<path>
|
--log-net-log=<path>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user