fix: hardening
This commit is contained in:
168 files changed
+9166
-1644
No files matched your search
@@ -9,6 +9,7 @@ Part of the [proxy-suite options reference](./index.md).
|
||||
- inbounds
|
||||
- [enable](#services-proxy-suite-inbounds-enable)
|
||||
- [package](#services-proxy-suite-inbounds-package)
|
||||
- [accessLog](#services-proxy-suite-inbounds-accesslog)
|
||||
- [listeners](#services-proxy-suite-inbounds-listeners)
|
||||
- `<name>`
|
||||
- [acceptProxyProtocol](#services-proxy-suite-inbounds-listeners-name-acceptproxyprotocol)
|
||||
@@ -172,6 +173,16 @@ XRay package that runs the inbounds, whichever client backend is used\.
|
||||
**Default:** proxy-suite’s ` xray ` (` pkgs/xray.nix `)\
|
||||
**Example:** `pkgs.xray`
|
||||
|
||||
<a id="services-proxy-suite-inbounds-accesslog"></a>
|
||||
## services\.proxy-suite\.inbounds\.accessLog
|
||||
|
||||
Log every connection, with the user, their address and the site, to the journal of
|
||||
proxy-suite-inbounds: who went where, for anyone who can read the journal\. On with
|
||||
` proxy.autoProxy ` whatever this says, which learns from those lines\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-inbounds-listeners"></a>
|
||||
## services\.proxy-suite\.inbounds\.listeners
|
||||
|
||||
@@ -531,7 +542,7 @@ clients the rest\.
|
||||
Tunnel IPv6 subnet (ULA)\. ` null `: IPv4 only\. With ` mode = "lan" ` it turns on IPv6
|
||||
forwarding, which stops this host from configuring itself from router advertisements\.
|
||||
|
||||
**Type:** null or string\
|
||||
**Type:** null or IPv6 CIDR\
|
||||
**Default:** `null`\
|
||||
**Example:** `"fd66:66::/64"`
|
||||
|
||||
@@ -1106,7 +1117,10 @@ Open the firewall for every listener not on loopback\.
|
||||
<a id="services-proxy-suite-inbounds-routing-blockprivate"></a>
|
||||
## services\.proxy-suite\.inbounds\.routing\.blockPrivate
|
||||
|
||||
Block private and loopback addresses, so clients cannot reach this host’s LAN or local services\.
|
||||
Block private and loopback addresses, so clients cannot reach this host’s LAN or local
|
||||
services\. Off, the LAN is open but this host is not\. Either way, this host’s own
|
||||
addresses (loopback, and its public ones as its interfaces carry them at start) are
|
||||
reachable only on the listener ports and ` serverPorts `, whichever ` via ` a client takes\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `true`
|
||||
@@ -1228,7 +1242,10 @@ fallbacks\. Members of ` userControl.group ` need the “inbounds” scope\.
|
||||
## services\.proxy-suite\.inbounds\.runtime\.fallbackDests
|
||||
|
||||
` dest ` values a runtime listener’s fallbacks may use, such as a decoy site\. A
|
||||
fallback to a ` listener ` must name another runtime listener\.
|
||||
fallback to a ` listener ` must name another runtime listener\. A runtime listener’s
|
||||
` reality.dest ` may be any public site on port 443; one on another port, on this host
|
||||
or on a private network must be listed here\. Its ` hysteria.masquerade ` must be a
|
||||
public http(s) site, on port 80 or 443 unless its ` host:port ` is listed here\.
|
||||
|
||||
**Type:** list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string)\
|
||||
**Default:** `[ ]`\
|
||||
@@ -1336,7 +1353,13 @@ covers that name and every name under it, for a host behind a wildcard record\.
|
||||
Ports of this host’s other services that clients reach through the tunnel on
|
||||
` serverAddress ` and ` serverAliases `, such as mail, beside the listeners’ own\. Direct
|
||||
like those: a connection to this host from itself skips its firewall, so list only
|
||||
what the firewall already opens to the internet\. TCP and UDP alike\.
|
||||
what the firewall already opens to the internet\. TCP and UDP alike\. Any other port on
|
||||
any address of this host is refused where the inbounds dial “direct” themselves; the
|
||||
addresses are read as the inbounds start, so restart them after one changes (DHCP)\.
|
||||
Without ` routing.serverSource ` these connections come from this host’s own address,
|
||||
which its services may trust: a mail server that relays for its own host (Postfix’s
|
||||
default ` mynetworks `) relays for every inbound user then\. Set ` serverSource `, or keep
|
||||
such services from trusting this host’s own addresses\.
|
||||
|
||||
**Type:** list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string matching the pattern \[0-9]±\[0-9]+)\
|
||||
**Default:** `[ ]`\
|
||||
|
||||
+21
-1
@@ -23,6 +23,7 @@ Update the module option docs there instead of editing these files by hand.
|
||||
| [userControl](./userControl.md) | Let a group use `proxy-ctl` without root. |
|
||||
| [gui](./gui.md) | The desktop app with a tray icon. |
|
||||
| [tui](./tui.md) | The `proxy-tui` terminal UI. |
|
||||
| [tools](./tools.md) | Heavy helpers `proxy-ctl` can do without: lnav and curl-impersonate. |
|
||||
|
||||
<a id="services-proxy-suite-enable"></a>
|
||||
## services\.proxy-suite\.enable
|
||||
@@ -69,6 +70,7 @@ services.proxy-suite = {
|
||||
refreshInterval = 3;
|
||||
};
|
||||
inbounds = {
|
||||
accessLog = false;
|
||||
enable = false;
|
||||
listeners = { };
|
||||
openFirewall = true;
|
||||
@@ -109,7 +111,12 @@ services.proxy-suite = {
|
||||
users = { };
|
||||
};
|
||||
killSwitch = {
|
||||
allowedSubnets = config.services.proxy-suite.proxy.tproxy.localSubnets;
|
||||
directFallbacks = true;
|
||||
enable = false;
|
||||
timeSyncUsers = ‹the users of the enabled timesyncd, chrony, ntp and openntpd on NixOS; elsewhere
|
||||
[ "systemd-timesync" "chrony" "_chrony" "ntp" "ntpsec" ]
|
||||
›;
|
||||
};
|
||||
perAppRouting = {
|
||||
createDefaultProfiles = false;
|
||||
@@ -228,6 +235,11 @@ services.proxy-suite = {
|
||||
ruleSets = { };
|
||||
rules = [ ];
|
||||
};
|
||||
runtimeSubscriptions = {
|
||||
allowHttp = false;
|
||||
allowInsecure = false;
|
||||
allowPrivateServers = false;
|
||||
};
|
||||
selection = "first";
|
||||
selectionExclude = [ ];
|
||||
singBox = {
|
||||
@@ -281,7 +293,7 @@ services.proxy-suite = {
|
||||
user = null;
|
||||
};
|
||||
serviceUser = "proxy-suite-daemon";
|
||||
strictHostKeyChecking = "accept-new";
|
||||
strictHostKeyChecking = "yes";
|
||||
};
|
||||
tgWsProxy = {
|
||||
bufferKiB = 256;
|
||||
@@ -310,6 +322,14 @@ services.proxy-suite = {
|
||||
secret = null;
|
||||
secretFile = null;
|
||||
};
|
||||
tools = {
|
||||
curlImpersonate = {
|
||||
enable = ‹true, false on nix-on-droid›;
|
||||
};
|
||||
lnav = {
|
||||
enable = ‹true, false on nix-on-droid›;
|
||||
};
|
||||
};
|
||||
tor = {
|
||||
asOutbound = false;
|
||||
bridges = {
|
||||
|
||||
@@ -8,14 +8,55 @@ Part of the [proxy-suite options reference](./index.md).
|
||||
|
||||
- killSwitch
|
||||
- [enable](#services-proxy-suite-killswitch-enable)
|
||||
- [allowedSubnets](#services-proxy-suite-killswitch-allowedsubnets)
|
||||
- [directFallbacks](#services-proxy-suite-killswitch-directfallbacks)
|
||||
- [timeSyncUsers](#services-proxy-suite-killswitch-timesyncusers)
|
||||
|
||||
<a id="services-proxy-suite-killswitch-enable"></a>
|
||||
## services\.proxy-suite\.killSwitch\.enable
|
||||
|
||||
Block outgoing traffic that bypasses the active global tunnel (TUN, TProxy or a global
|
||||
AmneziaWG profile), including while it restarts or after it fails\. LAN, DHCP and NTP stay
|
||||
open; ` proxy.tproxy.lanInterfaces ` devices keep the LAN but lose the internet\. Only turning
|
||||
the tunnel off, or ` proxy-ctl killswitch off `, lifts it\.
|
||||
AmneziaWG profile) from boot until the tunnel is up, while it restarts and after it
|
||||
fails\. LAN, DHCP and the time daemons’ NTP stay open\. Forwarded traffic TProxy does not
|
||||
divert reaches the LAN only from ` proxy.tproxy.lanInterfaces `\. With TUN or a global
|
||||
AmneziaWG profile configured, containers’ and VMs’ traffic is held to the LAN too while
|
||||
neither that tunnel nor TProxy is up\. Only turning the tunnel off with ` proxy-ctl `, or
|
||||
` proxy-ctl killswitch off `, lifts it, until the next boot or tunnel start\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-killswitch-allowedsubnets"></a>
|
||||
## services\.proxy-suite\.killSwitch\.allowedSubnets
|
||||
|
||||
Networks the kill switch leaves open besides the private and reserved ranges, such as
|
||||
a routed IPv6 prefix on a VM bridge, whichever global mode is on\. The default keeps
|
||||
what TProxy leaves out reachable; set it to open a network without also taking it out
|
||||
of TProxy\.
|
||||
|
||||
**Type:** list of IPv4 or IPv6 address or CIDR\
|
||||
**Default:** `config.services.proxy-suite.proxy.tproxy.localSubnets`\
|
||||
**Example:** `[ "192.168.0.0/16" "2001:db8:1::/64" ]`
|
||||
|
||||
<a id="services-proxy-suite-killswitch-directfallbacks"></a>
|
||||
## services\.proxy-suite\.killSwitch\.directFallbacks
|
||||
|
||||
Whether, with the kill switch on, a subscription that cannot be fetched through the
|
||||
tunnel is fetched once more directly, and WARP registers directly when the local proxy
|
||||
cannot carry it\. Either shows that server this host’s own address\. Off, both go through
|
||||
the tunnel or not at all: a cold start with nothing cached then has no outbounds from
|
||||
that subscription, and a WARP device that is itself the tunnel cannot register\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `true`
|
||||
|
||||
<a id="services-proxy-suite-killswitch-timesyncusers"></a>
|
||||
## services\.proxy-suite\.killSwitch\.timeSyncUsers
|
||||
|
||||
Users that may send NTP (UDP port 123) past the kill switch\. Users that do not exist
|
||||
are skipped when it starts\. A daemon sending from port 123 itself, as ntpd does, needs
|
||||
no entry\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Default:** the users of the enabled timesyncd, chrony, ntp and openntpd on NixOS; elsewhere ` [ "systemd-timesync" "chrony" "_chrony" "ntp" "ntpsec" ] `\
|
||||
**Example:** `[ "chrony" ]`
|
||||
@@ -141,7 +141,7 @@ Firewall mark for wrapped apps’ traffic\.
|
||||
|
||||
Subnets that skip the proxy (DNS still goes through it)\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of IPv4 or IPv6 address or CIDR\
|
||||
**Default:** `[ "192.168.0.0/16" ]`\
|
||||
**Example:** `[ "192.168.0.0/16" "10.0.0.0/8" ]`
|
||||
|
||||
@@ -164,9 +164,9 @@ Whether to enable per-app TUN\.
|
||||
<a id="services-proxy-suite-perapprouting-tun-address"></a>
|
||||
## services\.proxy-suite\.perAppRouting\.tun\.address
|
||||
|
||||
Interface address (CIDR)\.
|
||||
Interface IPv4 address (CIDR)\.
|
||||
|
||||
**Type:** string\
|
||||
**Type:** IPv4 CIDR\
|
||||
**Default:** `"172.20.0.1/30"`
|
||||
|
||||
<a id="services-proxy-suite-perapprouting-tun-fwmark"></a>
|
||||
@@ -182,7 +182,7 @@ Firewall mark for wrapped apps’ traffic\.
|
||||
|
||||
Interface name\.
|
||||
|
||||
**Type:** string\
|
||||
**Type:** network interface name\
|
||||
**Default:** `"psperapptun0"`
|
||||
|
||||
<a id="services-proxy-suite-perapprouting-tun-localsubnets"></a>
|
||||
@@ -190,7 +190,7 @@ Interface name\.
|
||||
|
||||
Subnets that skip the proxy (DNS still goes through it)\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of IPv4 or IPv6 address or CIDR\
|
||||
**Default:** `[ "192.168.0.0/16" ]`\
|
||||
**Example:** `[ "192.168.0.0/16" "10.0.0.0/8" ]`
|
||||
|
||||
@@ -217,7 +217,7 @@ Subnets an app run ` --via ` an AmneziaWG interface (an “interface” outbound
|
||||
profile) still reaches directly; DNS still goes through the tunnel\. Every other
|
||||
address goes through it, private ones included, as the server may serve them\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of IPv4 or IPv6 address or CIDR\
|
||||
**Default:** `[ "192.168.0.0/16" ]`\
|
||||
**Example:** `[ "192.168.0.0/16" "10.0.0.0/8" ]`
|
||||
|
||||
|
||||
+74
-12
@@ -103,6 +103,10 @@ Part of the [proxy-suite options reference](./index.md).
|
||||
- [ips](#services-proxy-suite-proxy-routing-rules-ips)
|
||||
- [outbound](#services-proxy-suite-proxy-routing-rules-outbound)
|
||||
- [ruleSets](#services-proxy-suite-proxy-routing-rules-rulesets)
|
||||
- runtimeSubscriptions
|
||||
- [allowHttp](#services-proxy-suite-proxy-runtimesubscriptions-allowhttp)
|
||||
- [allowInsecure](#services-proxy-suite-proxy-runtimesubscriptions-allowinsecure)
|
||||
- [allowPrivateServers](#services-proxy-suite-proxy-runtimesubscriptions-allowprivateservers)
|
||||
- [selection](#services-proxy-suite-proxy-selection)
|
||||
- [selectionExclude](#services-proxy-suite-proxy-selectionexclude)
|
||||
- singBox
|
||||
@@ -111,6 +115,8 @@ Part of the [proxy-suite options reference](./index.md).
|
||||
- [subscriptionUpdateInterval](#services-proxy-suite-proxy-subscriptionupdateinterval)
|
||||
- [subscriptions](#services-proxy-suite-proxy-subscriptions)
|
||||
- item
|
||||
- [allowInsecure](#services-proxy-suite-proxy-subscriptions-allowinsecure)
|
||||
- [allowPrivateServers](#services-proxy-suite-proxy-subscriptions-allowprivateservers)
|
||||
- [detour](#services-proxy-suite-proxy-subscriptions-detour)
|
||||
- [tag](#services-proxy-suite-proxy-subscriptions-tag)
|
||||
- [url](#services-proxy-suite-proxy-subscriptions-url)
|
||||
@@ -192,7 +198,8 @@ authentication, even with ` proxy.listener.auth ` set\.
|
||||
<a id="services-proxy-suite-proxy-autoproxy-probesperrun"></a>
|
||||
## services\.proxy-suite\.proxy\.autoProxy\.probesPerRun
|
||||
|
||||
Maximum destinations probed per run\. The rest wait for the next run, most-used first\.
|
||||
Maximum destinations probed per run: of those asked for with ` proxy-ctl proxy auto learn `, and again of those queued from traffic\. The rest wait for the next run, the
|
||||
queued ones most-used first\. A run also ends after two hours, its probes kept\.
|
||||
|
||||
**Type:** positive integer, meaning >0\
|
||||
**Default:** `200`
|
||||
@@ -449,9 +456,10 @@ Subscriptions whose every entry is a member, as the subscription holds them at s
|
||||
<a id="services-proxy-suite-proxy-ipv6"></a>
|
||||
## services\.proxy-suite\.proxy\.ipv6
|
||||
|
||||
Route IPv6 through TUN and TProxy too\. When off, TProxy ignores IPv6 and the TUNs block
|
||||
it, so apps fall back to IPv4\. If the uplink has no IPv6, also set
|
||||
` proxy.dns.strategy = "ipv4_only" `, or direct IPv6 connections hang instead of falling back\.
|
||||
Route IPv6 through TUN and TProxy too\. When off, TProxy refuses IPv6 past the LAN and
|
||||
on-link prefixes and the TUNs block it, so apps fall back to IPv4\. If the uplink has no
|
||||
IPv6, also set ` proxy.dns.strategy = "ipv4_only" `, or direct IPv6 connections hang
|
||||
instead of falling back\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `config.networking.enableIPv6`
|
||||
@@ -461,7 +469,7 @@ it, so apps fall back to IPv4\. If the uplink has no IPv6, also set
|
||||
|
||||
Address of the local SOCKS5/HTTP proxy\. Use “0\.0\.0\.0” only to expose it to the network\.
|
||||
|
||||
**Type:** string\
|
||||
**Type:** IP address or host name\
|
||||
**Default:** `"127.0.0.1"`
|
||||
|
||||
<a id="services-proxy-suite-proxy-listener-auth-password"></a>
|
||||
@@ -837,9 +845,9 @@ Download through the proxy or directly\.
|
||||
<a id="services-proxy-suite-proxy-routing-rulesets-name-url"></a>
|
||||
## services\.proxy-suite\.proxy\.routing\.ruleSets\.\<name>\.url
|
||||
|
||||
URL of the sing-box rule set\.
|
||||
URL of the sing-box rule set (https only)\.
|
||||
|
||||
**Type:** string matching the pattern https?://\.+\
|
||||
**Type:** string matching the pattern https://\.+\
|
||||
**Example:** `"https://example.com/antifilter.srs"`
|
||||
|
||||
<a id="services-proxy-suite-proxy-routing-rules"></a>
|
||||
@@ -921,6 +929,35 @@ Rule sets from ` proxy.routing.ruleSets ` that this rule matches (sing-box and h
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "antifilter" ]`
|
||||
|
||||
<a id="services-proxy-suite-proxy-runtimesubscriptions-allowhttp"></a>
|
||||
## services\.proxy-suite\.proxy\.runtimeSubscriptions\.allowHttp
|
||||
|
||||
Let subscriptions added at runtime (` proxy-ctl proxy subs add `) be fetched over plain
|
||||
http\. Anyone on the way can then add entries of their own\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-proxy-runtimesubscriptions-allowinsecure"></a>
|
||||
## services\.proxy-suite\.proxy\.runtimeSubscriptions\.allowInsecure
|
||||
|
||||
Keep entries of subscriptions added at runtime that turn certificate checks off, as
|
||||
` subscriptions.*.allowInsecure ` does for a declared one\. Anyone on the way can then
|
||||
stand in for those servers\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-proxy-runtimesubscriptions-allowprivateservers"></a>
|
||||
## services\.proxy-suite\.proxy\.runtimeSubscriptions\.allowPrivateServers
|
||||
|
||||
Keep entries of subscriptions added at runtime whose server is a private address, as
|
||||
` subscriptions.*.allowPrivateServers ` does for a declared one\. Whoever can add a
|
||||
subscription then picks servers on your network\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-proxy-selection"></a>
|
||||
## services\.proxy-suite\.proxy\.selection
|
||||
|
||||
@@ -986,6 +1023,31 @@ start, cached, and refreshed on a timer\. ` proxy-ctl proxy subs add ` adds more
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ { tag = "private"; urlFile = "/run/secrets/private-sub-url"; } ]`
|
||||
|
||||
<a id="services-proxy-suite-proxy-subscriptions-allowinsecure"></a>
|
||||
## services\.proxy-suite\.proxy\.subscriptions\.\*\.allowInsecure
|
||||
|
||||
Keep entries that turn certificate checks off (` insecure=1 `, for hysteria2 and
|
||||
AnyTLS on sing-box), as for a provider with self-signed certificates\. Anyone on the
|
||||
way can then stand in for those servers\. Dropped otherwise\. For subscriptions added
|
||||
at runtime, see ` proxy.runtimeSubscriptions.allowInsecure `\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-proxy-subscriptions-allowprivateservers"></a>
|
||||
## services\.proxy-suite\.proxy\.subscriptions\.\*\.allowPrivateServers
|
||||
|
||||
Keep entries whose server is a private address (10\.0\.0\.0/8, 172\.16\.0\.0/12,
|
||||
192\.168\.0\.0/16, 100\.64\.0\.0/10, fc00::/7), such as a subscription served on your own
|
||||
network\. Entries pointing at this host (loopback, “localhost”, unspecified) or at a
|
||||
link-local or multicast address are dropped either way: whoever serves the list picks
|
||||
the servers, and the fastest wins\. Only literal addresses (and “localhost”) are
|
||||
checked\. For subscriptions added at runtime, see
|
||||
` proxy.runtimeSubscriptions.allowPrivateServers `\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-proxy-subscriptions-detour"></a>
|
||||
## services\.proxy-suite\.proxy\.subscriptions\.\*\.detour
|
||||
|
||||
@@ -1047,7 +1109,7 @@ LAN interfaces whose devices use this host as their gateway\. Their TCP and UDP
|
||||
proxy; everything else is forwarded as usual\. Turns on IP forwarding\. Needs the nftables
|
||||
firewall on NixOS\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of network interface name\
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "br0" ]`
|
||||
|
||||
@@ -1056,7 +1118,7 @@ firewall on NixOS\.
|
||||
|
||||
Subnets that skip the proxy, such as your LAN and VM bridges (DNS still goes through it)\. IPv6 works too\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of IPv4 or IPv6 address or CIDR\
|
||||
**Default:** `[ "192.168.0.0/16" ]`\
|
||||
**Example:** `[ "192.168.0.0/16" "10.0.0.0/8" "fd00::/8" ]`
|
||||
|
||||
@@ -1095,9 +1157,9 @@ Whether to enable global TUN mode\.
|
||||
<a id="services-proxy-suite-proxy-tun-address"></a>
|
||||
## services\.proxy-suite\.proxy\.tun\.address
|
||||
|
||||
TUN interface address (CIDR)\.
|
||||
TUN interface IPv4 address (CIDR)\.
|
||||
|
||||
**Type:** string\
|
||||
**Type:** IPv4 CIDR\
|
||||
**Default:** `"172.19.0.1/30"`
|
||||
|
||||
<a id="services-proxy-suite-proxy-tun-interface"></a>
|
||||
@@ -1105,7 +1167,7 @@ TUN interface address (CIDR)\.
|
||||
|
||||
TUN interface name\.
|
||||
|
||||
**Type:** string\
|
||||
**Type:** network interface name\
|
||||
**Default:** `"singtun0"`
|
||||
|
||||
<a id="services-proxy-suite-proxy-tun-mtu"></a>
|
||||
|
||||
@@ -64,8 +64,8 @@ Extra OpenSSH arguments\.
|
||||
<a id="services-proxy-suite-sshproxy-hostkey"></a>
|
||||
## services\.proxy-suite\.sshProxy\.hostKey
|
||||
|
||||
Accepted host keys, for sing-box\. List every key ` ssh-keyscan ` prints, since the key type
|
||||
is negotiated\.
|
||||
Accepted host keys, for sing-box, and for OpenSSH without ` knownHostsFile `\. List every
|
||||
key ` ssh-keyscan ` prints, since the key type is negotiated\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Default:** `[ ]`\
|
||||
@@ -74,7 +74,7 @@ is negotiated\.
|
||||
<a id="services-proxy-suite-sshproxy-hostkeyfile"></a>
|
||||
## services\.proxy-suite\.sshProxy\.hostKeyFile
|
||||
|
||||
Known-hosts file to read host keys from (sing-box)\. Takes priority over ` hostKey `\.
|
||||
Known-hosts file to read host keys from (sing-box, and OpenSSH without ` knownHostsFile `)\. Takes priority over ` hostKey `\.
|
||||
|
||||
**Type:** null or string\
|
||||
**Default:** `null`\
|
||||
@@ -109,7 +109,9 @@ Address of the OpenSSH SOCKS5 listener\.
|
||||
<a id="services-proxy-suite-sshproxy-listener-port"></a>
|
||||
## services\.proxy-suite\.sshProxy\.listener\.port
|
||||
|
||||
Port of the OpenSSH SOCKS5 listener\.
|
||||
Port of the OpenSSH SOCKS5 listener\. It takes no login: where it is the XRay backend’s
|
||||
hop (` asOutbound `) on a host with root, only proxy-suite’s daemons and root may
|
||||
connect to it\. A standalone tunnel stays open to every local user\.
|
||||
|
||||
**Type:** 16 bit unsigned integer; between 0 and 65535 (both inclusive)\
|
||||
**Default:** `1091`
|
||||
@@ -143,17 +145,20 @@ SSH login user\.
|
||||
<a id="services-proxy-suite-sshproxy-serviceuser"></a>
|
||||
## services\.proxy-suite\.sshProxy\.serviceUser
|
||||
|
||||
User that runs OpenSSH\. The default is sandboxed; ` null ` runs it as root\.
|
||||
User that runs OpenSSH\. The default is sandboxed; ` null ` runs it as root\. Another user’s
|
||||
traffic gets past the kill switch, all of it: never a login user’s\.
|
||||
|
||||
**Type:** null or string matching the pattern \[^\[:space:]]+\
|
||||
**Type:** null or string matching the pattern \[a-z_]\[a-z0-9_-]\*\[$]?\
|
||||
**Default:** `"proxy-suite-daemon"`\
|
||||
**Example:** `"proxy"`
|
||||
|
||||
<a id="services-proxy-suite-sshproxy-stricthostkeychecking"></a>
|
||||
## services\.proxy-suite\.sshProxy\.strictHostKeyChecking
|
||||
|
||||
OpenSSH host key policy\.
|
||||
OpenSSH host key policy\. “yes” needs the server’s keys: ` knownHostsFile `, or else
|
||||
` hostKeyFile ` or ` hostKey `\. “accept-new” takes whatever key the first connection
|
||||
meets, which anyone on the way can answer then\.
|
||||
|
||||
**Type:** one of “yes”, “accept-new”, “no”\
|
||||
**Default:** `"accept-new"`\
|
||||
**Example:** `"yes"`
|
||||
**Default:** `"yes"`\
|
||||
**Example:** `"accept-new"`
|
||||
@@ -0,0 +1,31 @@
|
||||
# services.proxy-suite.tools
|
||||
|
||||
Heavy helpers `proxy-ctl` can do without: lnav and curl-impersonate.
|
||||
|
||||
Part of the [proxy-suite options reference](./index.md).
|
||||
|
||||
## Options
|
||||
|
||||
- tools
|
||||
- curlImpersonate
|
||||
- [enable](#services-proxy-suite-tools-curlimpersonate-enable)
|
||||
- lnav
|
||||
- [enable](#services-proxy-suite-tools-lnav-enable)
|
||||
|
||||
<a id="services-proxy-suite-tools-curlimpersonate-enable"></a>
|
||||
## services\.proxy-suite\.tools\.curlImpersonate\.enable
|
||||
|
||||
Probe with curl-impersonate (` proxy-ctl proxy auto probe `, and autoProxy), which
|
||||
presents a browser’s TLS fingerprint\. Without it probes use plain curl, which some
|
||||
bot protection refuses, so a working exit can be judged blocked\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** ` true `, ` false ` on nix-on-droid
|
||||
|
||||
<a id="services-proxy-suite-tools-lnav-enable"></a>
|
||||
## services\.proxy-suite\.tools\.lnav\.enable
|
||||
|
||||
Follow ` proxy-ctl logs ` in lnav\. Without it they follow in less\.
|
||||
|
||||
**Type:** boolean\
|
||||
**Default:** ` true `, ` false ` on nix-on-droid
|
||||
+4
-2
@@ -66,7 +66,7 @@ File with more bridge lines, one per line\. Blank lines and \# comments are skip
|
||||
Bridge lines from https://bridges\.torproject\.org, without the leading “Bridge”\. Setting
|
||||
any turns bridges on\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of string matching the pattern \[^ ]\*\
|
||||
**Default:** `[ ]`\
|
||||
**Example:**
|
||||
|
||||
@@ -159,7 +159,9 @@ Bridge transport for snowflake\.
|
||||
<a id="services-proxy-suite-tor-socksport"></a>
|
||||
## services\.proxy-suite\.tor\.socksPort
|
||||
|
||||
Loopback SOCKS port of Tor\.
|
||||
Loopback SOCKS port of Tor\. Tor takes no login on it, so with ` asOutbound ` on a host with
|
||||
root only proxy-suite’s daemons and root may connect to it; other users reach Tor
|
||||
through the proxy’s own listener\.
|
||||
|
||||
**Type:** 16 bit unsigned integer; between 0 and 65535 (both inclusive)\
|
||||
**Default:** `18530`
|
||||
|
||||
@@ -89,7 +89,7 @@ Whether to enable skipping zapret for some subnets, such as NATed VMs it would b
|
||||
|
||||
Subnets zapret skips\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of IPv4 or IPv6 address or CIDR\
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "192.168.123.0/24" ]`
|
||||
|
||||
@@ -411,7 +411,7 @@ UDP packets sent, with at most ` udpIn ` replies, that count as a failure\.
|
||||
|
||||
Extra fake payloads by name (blob=\<name>): a file in zapret2’s files/fake, or an absolute path\.
|
||||
|
||||
**Type:** attribute set of string\
|
||||
**Type:** attribute set of string matching the pattern \[^\[:space:]]+\
|
||||
**Default:** `{ }`\
|
||||
**Example:** `{ tls_clienthello = "/etc/proxy-suite/my_clienthello.bin"; }`
|
||||
|
||||
@@ -449,7 +449,7 @@ Log everything nfqws2 does to the journal, every packet included\. Very verbose:
|
||||
|
||||
Domains always treated as blocked\. At runtime: ` proxy-ctl zapret auto add `\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of string matching the pattern \[^\[:space:]]+\
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "rutracker.org" ]`
|
||||
|
||||
@@ -458,7 +458,7 @@ Domains always treated as blocked\. At runtime: ` proxy-ctl zapret auto add `\.
|
||||
|
||||
Domains never touched or learned\. At runtime: ` proxy-ctl zapret auto exclude `\.
|
||||
|
||||
**Type:** list of string\
|
||||
**Type:** list of string matching the pattern \[^\[:space:]]+\
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "bank.example.com" ]`
|
||||
|
||||
|
||||
@@ -112,7 +112,8 @@ proxy-ctl restart # restart what is running
|
||||
In a terminal, `proxy-ctl logs` follows in [`lnav`](https://lnav.org): it follows while at
|
||||
the bottom, scrolling back pauses it, `G` follows again, `e`/`E` jump between errors, `/`
|
||||
searches, and `q` or Ctrl-C quits. `:enable-word-wrap` wraps long lines, and lnav remembers
|
||||
it for the next time. Piped, it is plain `journalctl -f`.
|
||||
it for the next time. Without lnav ([`tools.lnav.enable`](../options/tools.md#services-proxy-suite-tools-lnav-enable),
|
||||
off on Nix-on-Droid) it follows in `less`. Piped, it is plain `journalctl -f`.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -84,8 +84,9 @@ The tray app shows the same, and switches with a click.
|
||||
- `wrapEnv` sets the proxy variables for one program only, so the rest of the system keeps
|
||||
its direct routing. `protocol = "all"` sets both kinds, for a program whose choice you
|
||||
do not know.
|
||||
- The kill switch guards whichever global tunnel is on (TUN or the VPN), and does nothing
|
||||
while both are off.
|
||||
- The kill switch guards whichever global tunnel is on (TUN or the VPN). It is up from boot,
|
||||
so the internet stays blocked until one of them starts; turning a tunnel off with
|
||||
`proxy-ctl` lifts it.
|
||||
- While global TUN is on, per-app `tun` profiles run the app as it is. Everything already goes
|
||||
through the proxy then.
|
||||
- See [Wrap programs with the proxy](../wrap-apps.md) for the helpers, and
|
||||
|
||||
@@ -67,6 +67,15 @@ nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
optimisation for it.
|
||||
- Point other apps at `127.0.0.1:1080`, in their own proxy settings or in the Wi-Fi proxy
|
||||
settings.
|
||||
- To save space, `proxy-ctl` comes without lnav and curl-impersonate: `proxy-ctl logs`
|
||||
follows in `less`, and probes use plain curl. Set
|
||||
[`tools.lnav.enable`](../options/tools.md#services-proxy-suite-tools-lnav-enable) and
|
||||
[`tools.curlImpersonate.enable`](../options/tools.md#services-proxy-suite-tools-curlimpersonate-enable)
|
||||
to have them back.
|
||||
- Every app on the phone can reach `127.0.0.1`, not only the ones you point at the proxy: set
|
||||
`proxy.listener.auth` so that only those you give the login to can use it. The loopback
|
||||
hops behind it take a login of their own, drawn per boot, except Tor's SOCKS port and the
|
||||
OpenSSH tunnel's under XRay, which take none: any app reaches those exits.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -109,8 +109,11 @@ services.proxy-suite = {
|
||||
the global mode already carries its traffic. `proxy-ctl` prints a note when it does. So
|
||||
does `--via`, except that an "interface" AmneziaWG outbound still takes the app under a
|
||||
global TProxy or AmneziaWG profile.
|
||||
- If `/etc/resolv.conf` points only at a local resolver (such as systemd-resolved on
|
||||
127.0.0.53), the app's DNS queries skip its route. `proxy-ctl` warns about this.
|
||||
- With `tun` and `tproxy`, the app's DNS queries go through its route wherever its resolver
|
||||
is, a local one (such as systemd-resolved on 127.0.0.53) or the LAN router. Lookups glibc
|
||||
hands to nscd (NixOS's default) do not: nscd resolves them itself, outside the route.
|
||||
`proxy-ctl` warns when nscd runs. Apps that resolve names themselves are not affected:
|
||||
programs built with Go, and browsers using their own resolver or DNS-over-HTTPS.
|
||||
- The app follows your [routing rules](./routing.md) like any other proxied traffic.
|
||||
|
||||
## See also
|
||||
|
||||
@@ -7,7 +7,9 @@ applies to the local proxy, TUN, TProxy and per-app routing alike.
|
||||
|
||||
1. `proxy.routing.rules`, in order. The first match wins, and a rule can name a specific
|
||||
outbound.
|
||||
2. The `proxy`, `direct` and `block` lists.
|
||||
2. The lists: `proxy.domains` and `proxy.ips` first, then `block`, then `direct`, then
|
||||
`proxy.geosites`, `proxy.geoips` and `proxy.ruleSets`. A name in both a block and a direct
|
||||
list (an ad domain under `category-ru`, say) is blocked.
|
||||
3. Anything left goes to `proxy.routing.default`: `"proxy"` (the default) or `"direct"`.
|
||||
|
||||
Russian sites and IPs go direct unless you set `routing.directRu = false`.
|
||||
|
||||
@@ -148,6 +148,9 @@ Without root, members of `userControl.group` need the `inbounds` scope.
|
||||
|
||||
- Clients cannot reach this host's LAN or Russian sites by default
|
||||
(`inbounds.routing.blockPrivate`, `blockRu`).
|
||||
- Through "direct", clients reach this host itself only on the listeners' ports and
|
||||
`inbounds.serverPorts` (80/443 with subscriptions), whatever it listens on. Its addresses
|
||||
are read when the inbounds start: restart them after the address changes.
|
||||
- With `routing.via = "proxy"` (the default), client traffic goes through this host's own
|
||||
proxy instead, following its routing. That needs `proxy.enable`. A listener can also exit
|
||||
through one outbound with `via = "<tag>"`.
|
||||
|
||||
@@ -44,8 +44,20 @@ proxy-ctl killswitch off # lift the kill switch without stopping the tunnel
|
||||
|
||||
## Good to know
|
||||
|
||||
- The kill switch blocks outgoing traffic while the tunnel restarts or after it fails, so
|
||||
nothing leaks. LAN, DHCP and NTP stay open. Turning the tunnel off lifts it.
|
||||
- The kill switch blocks outgoing traffic from boot until the tunnel is up, while it restarts
|
||||
and after it fails, so nothing leaks. LAN, DHCP and the time daemon's NTP stay open.
|
||||
Subscriptions are fetched through the tunnel; only if that fails are they fetched
|
||||
directly, so the proxy can come up from a cold cache. The subscription host then sees
|
||||
your address. Turning the tunnel off with `proxy-ctl` lifts the kill switch until the
|
||||
next boot or tunnel start.
|
||||
- With TUN or a global AmneziaWG profile, the kill switch also holds forwarded traffic
|
||||
(Docker, libvirt, podman) to the LAN while the tunnel is down. TProxy diverts only
|
||||
`proxy.tproxy.lanInterfaces`, so in TProxy mode other containers and VMs bypass the proxy
|
||||
whether the tunnel is up or not. With TProxy alone the kill switch lets them through, and
|
||||
with TUN or AmneziaWG also configured it cuts them off in TProxy mode.
|
||||
- Networks the kill switch should leave open besides the private ranges, such as a routed
|
||||
IPv6 prefix on a VM bridge, go in `killSwitch.allowedSubnets`. It defaults to
|
||||
`proxy.tproxy.localSubnets`, so what TProxy leaves out stays reachable.
|
||||
- If the uplink has no IPv6, set `proxy.dns.strategy = "ipv4_only"` (sing-box). Otherwise
|
||||
direct IPv6 connections hang instead of falling back to IPv4.
|
||||
- `proxy.tproxy.localSubnets` lists networks that skip TProxy. Add your LAN and VM bridges if
|
||||
|
||||
Reference in new issue
Block a user