Files
proxy-suite-flake/docs/options/tor.md
T
2026-10-12 03:24:23 +00:00

5.9 KiB
Raw Blame History

services.proxy-suite.tor

Tor as an outbound, with bridges, and an onion service for the inbounds.

Part of the proxy-suite options reference.

Options

services.proxy-suite.tor.enable

Run Tor. Also turn on asOutbound, onionService.enable, or both.

Type: boolean
Default: false

services.proxy-suite.tor.package

Tor package.

Type: package
Default: pkgs.tor

services.proxy-suite.tor.asOutbound

Add Tor as an outbound tagged “tor”. Selection and autoProxy skip it unless it is the only outbound; send traffic to it with proxy.routing.rules or use it as a detour. Needs proxy.enable.

Type: boolean
Default: false

services.proxy-suite.tor.bridges.file

File with more bridge lines, one per line. Blank lines and # comments are skipped.

Type: null or string
Default: null
Example: "/run/secrets/tor-bridges"

services.proxy-suite.tor.bridges.lines

Bridge lines from https://bridges.torproject.org, without the leading “Bridge”. Setting any turns bridges on.

Type: list of string matching the pattern [^ ]*
Default: [ ]
Example:

[
  "obfs4 192.0.2.1:443 0123456789ABCDEF0123456789ABCDEF01234567 cert=... iat-mode=0"
]

services.proxy-suite.tor.clientOnly

Keep Tor a client, never a relay, even if extraConfig sets an ORPort. The onion service works either way. Turn off only to run a relay through extraConfig.

Type: boolean
Default: true

services.proxy-suite.tor.extraConfig

Extra torrc lines.

Type: strings concatenated with “\n”
Default: ""
Example:

''
  ExitNodes {de},{nl}
  StrictNodes 1
''

services.proxy-suite.tor.keepAwake

Never let Tor go dormant. By default it does after a day without use, and from then on only rebuilds its circuits when the next connection comes: the first .onion after a quiet spell may wait long enough to fail. Turn on where clients expect .onion at once, as on a server whose inbounds route it. A dormant Tor also starts dormant again; this wakes it.

Type: boolean
Default: false

services.proxy-suite.tor.lyrebirdPackage

Bridge transport for obfs4, webtunnel and meek_lite.

Type: package
Default: pkgs.lyrebird

services.proxy-suite.tor.onionService.enable

Whether to enable an onion service for the server inbounds.

Type: boolean
Default: false

services.proxy-suite.tor.onionService.listeners

Listeners reachable through the onion address. null: every TCP listener (not amneziawg, h3-only xhttp or raw JSON).

Get their links with proxy-ctl inbounds link TAG --onion; subscriptions include them. Onion clients do not show up in proxy-ctl inbounds online.

Type: null or (list of string)
Default: null
Example: [ "vless-reality" ]

services.proxy-suite.tor.onionService.secretKeyFile

File with an hs_ed25519_secret_key, to keep a fixed onion address. null: Tor creates one.

Type: null or string
Default: null
Example: "/run/secrets/tor-hs_ed25519_secret_key"

services.proxy-suite.tor.routeOnion

Send .onion names to the “tor” outbound in every route mode, and never resolve them with DNS. Inbound clients’ .onion names go there too. Needs asOutbound.

Type: boolean
Default: true

services.proxy-suite.tor.snowflakePackage

Bridge transport for snowflake.

Type: package
Default: pkgs.snowflake

services.proxy-suite.tor.socksPort

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

services.proxy-suite.tor.upstream

How Tor reaches the network.

  • “direct”: straight from the uplink, bypassing TUN and TProxy.
  • “proxy”: through the local proxy, for networks that block Tor. Works with obfs4, webtunnel and meek_lite bridges, but not snowflake.

Type: one of “direct”, “proxy”
Default: "direct"