-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration options
Configuration is defined in config.json
located in the same directory of nyapass
. Items that are missing will be loaded from config.json.example
.
-
log_level
: Log level ofnyapass
, can be one of the levels defined by logging module of Python. Set toINFO
or higher to disable request logging. -
password
: Password used for authentication. PBKDF2 with SHA512 is used to derive actual keys used internally. -
salt
: Salt used in PBKDF2. -
key_interval
: How often (in seconds) doesnyapass
change its internal key for signing requests. -
pbkdf2_rounds
: Number of rounds of PBKDF2. -
use_custom_dns_resolver
: Use dnspython to resolve domains, which should be faster on many systems thanks to internal caching. -
threadpool_workers
: Number of thread pool workers. Thread pool is mainly used by DNS resolver, setting this to a high value can increase number of parallel DNS requests, in expense of memory.
-
port
: Listening port of local HTTP proxy. Set tonull
to disable HTTP proxy support. -
socks5_port
: Listening port of local Socks5 proxy. Set tonull
to disable Socks5 proxy support. -
shadowsocks_port
: Listening port of shadowsocks server. This is intended to be used on a server inside China to provide authenticated proxy service. Set tonull
to disable. -
listen_host
: Listening host of all the local services. -
server_host
: Host ofnyapass
server. Normally this should be the same as common name or subject alt name of certificate installed on your server, though IP address can be used if self-signed certificate is installed. -
server_port
: Port ofnyapass
server. -
divert_banned_requests
: Whether the client should directly connect to websites that are banned by server. This is used to implementchnroutes
-like functionality. -
socks5_hijack_http
: Normally Socks5/shadowsocks requests are implemented as HTTP CONNECT requests, if this option istrue
, Socks5/shadowsocks requests to port 80 are handled like going through HTTP proxy (IP address in Socks5 header is ignored), so that a round-trip is saved. -
shadowsocks_password
: Password of shadowsocks server. Set to empty string ornull
to use the main password. -
shadowsocks_method
: Encryption method of shadowsocks server. -
ssl_verify
: Whether the client should verify certificate ofnyapass
server. -
pin_server_cert
: Set totrue
to raise a critical error when certificate of server changes between requests, preventing MITM attack. -
known_hosts_file
: Path to file saving fingerprints of server certificates.
-
port
: Listening port ofnyapass
server. Should be 443 normally. -
listen_host
: Listening address ofnyapass
server. -
masq_host
: Host of the website that will be presented to unauthenticated clients. -
masq_port
: Port of the website that will be presented to unauthenticated clients. -
masq_strip_cookies
: Whether to strip all cookies coming frommasq_host
. -
standalone_mode
: If set tofalse
, requests will be forwarded to another HTTP proxy (specified byforwarder_host
andforwarder_port
). If set totrue
,nyapass
server will forward requests itself. -
forwarder_host
: Host of forwarding HTTP proxy. Ignored ifstandalone_mode
iftrue
. -
forwarder_port
: Port of forwarding HTTP proxy. Ignored ifstandalone_mode
iftrue
. -
banned_network_list
: Path to a file listing all IP networks that will be refused bynyapass
server. Usechnetworks-build.py
to build this file with all Chinese IP networks. -
banned_domains
: List of domain suffixes that will be refused bynyapass
server. (Some Chinese websites offer CDN outside China, so their IP will not be inside China and has to be listed in here.) -
tls_cert
: Path to certificate used bynyapass
server. -
tls_key
: Path to private key file used bynyapass
server. -
tls_ciphers
: TLS cipher list (in OpenSSL format) thatnyapass
server uses.