TOR SETUP AND CONFIGURATION — JAVASCRIPT

Tor
OVERVIEW
Tor is the "Qompass AI Tor Setup" (GitHub repo description): a user-local installer and a set of shipped configurations for The Onion Router — the tor daemon, Tor Browser, the nyx monitor, the arti Rust client, and torsocks — plus example `torrc`/torsocks/nyx configs with v3 hidden services, and a Firefox extension ("Onion Control") that proxies the browser through Tor. The kind line's language is GitHub's primary-language classification for the repo (the `tor-bundle/` extension).
HOW IT WORKS
- 1The quickstart script presents a menu — 1) tor, 2) tor-browser, 3) nyx, 4) arti, 5) torsocks, a) All, q) Quit — and installs the selected components user-locally under `$HOME/.local` (binaries in `bin`, sources in `src/tor`, browser in `opt`), adding the bin dir to the session PATH.
- 2Tor itself is built from the pinned release tarball from dist.torproject.org and installed with a generated `$XDG_CONFIG_HOME/tor/torrc` (data directory under `~/.local/share/tor`, `ControlPort 9051`, `CookieAuthentication 1`); you launch it with `tor -f <that torrc>`.
- 3The shipped example `torrc` shows the fuller operating shape: SOCKS, DNS, and control ports, automapping of onion hosts on resolve, and five v3 hidden services forwarding onion ports to local services (nginx, SSH, WKD, git/Forgejo, and mail ports).
- 4Applications are torified two ways: torsocks wraps a command (`torsocks <command>`) using `example.torsocks.conf` to reach the Tor SOCKS port, and the "Onion Control" browser extension sets the browser's proxy/privacy settings to route through Tor, with a popup toggle and an options page.
- 5Nyx monitors the running tor process using the shipped `nyxrc` (graphing, accounting, and torrc display enabled); arti is installed via Cargo as the next-generation Rust client when Rust is available.
CONCEPTS
CONFIGURATION
| Option | Default | What it does |
|---|---|---|
SocksPort | 9002 | Tor SOCKS port in the example torrc |
ControlPort | `9031` in the example torrc; `9051` in the quickstart-generated torrc | Tor control port |
DNSPort | 127.0.0.1:9017 | Tor DNS resolver port |
CookieAuthentication | 1 | Authenticate control connections with a cookie file |
DataDirectory | `/home/example/.config/tor/data` in the example; `~/.local/share/tor` in the quickstart-generated torrc | Tor data directory |
AutomapHostsOnResolve | 1 | Automap `.onion` hosts on resolve |
HiddenServiceVersion | 3 | Hidden services are v3 (the repo test asserts this) |
HiddenServicePort | e.g. `80 127.0.0.1:8233` (nginx), `2040 127.0.0.1:22` (SSH), plus WKD, git, and mail forwards | Map an onion port to a local service |
`TorAddress` (torsocks) | 127.0.0.1 | Tor instance torsocks connects to |
`TorPort` (torsocks) | 9050 | Tor SOCKS port for torsocks |
`AllowInbound` (torsocks) | 0 | Disallow inbound connections through torsocks |
`AllowOutboundLocalhost` (torsocks) | 1 | Allow outbound localhost connections through torsocks |
`OnionAddrRange` (torsocks) | 127.42.42.0/24 | Virtual address range for onion addresses |
`use_tor` (tgr) | true | Route the `tgr` tool through Tor |
`tor_socks_port` (tgr) | 9050 | Tor SOCKS port used by `tgr` |
`default_keyserver` (tgr) | hkp://keys.openpgp.org | Default OpenPGP keyserver for `tgr` (`keyservers` also lists `hkp://pgp.mit.edu`) |
`timeout` / `max_retries` / `refresh_interval` (tgr) | 30` / `5` / `3600 | Request timeout, retry cap, and refresh interval for `tgr` |
`color_interface` (nyx) | true | Colored nyx interface |
`graph_stat` (nyx) | resources | Statistic shown in the nyx graph (`graph_interval`: each second) |
`tor_socks_address` (Tor Browser settings) | 127.0.0.1:9050 | SOCKS address in `torbrowser/settings.json` (`download_over_tor: true`, mirror `https://dist.torproject.org/`) |
`TOR_VERSION` (installer) | 0.4.8.11 | Tor release the quickstart builds |
`TORSOCKS_VERSION` (installer) | 2.4.0 | Torsocks release the quickstart builds |
`TOR_BROWSER_DEFAULT` (installer) | 13.0.14 | Fallback Tor Browser version if the latest cannot be determined |
CONTROLS
| Action | Control |
|---|---|
| Install components | Run `scripts/quickstart.sh` and choose `1`–`5`, `a` (all), or `q` (quit) at the menu |
| Launch tor | tor -f $XDG_CONFIG_HOME/tor/torrc |
| Launch Tor Browser | `tor-browser` (linked by the installer) |
| Monitor tor | nyx --config $XDG_CONFIG_HOME/nyx/nyxrc |
| Use arti | `arti` (after the Cargo-based install) |
| Torify a command | torsocks <command> |
| Toggle browser proxying | "Onion Control" extension popup (on/off) and its options page; permissions: storage, proxy, privacy, notifications, nativeMessaging |
| Uninstall | Remove the user-local prefix and config dirs as printed by the installer (`$PREFIX/{bin,lib,share,opt}`, sources, `~/.cache/arti`, `$XDG_CONFIG_HOME/{tor,nyx,arti}`) |
NOT COVERED
- There is no narrative documentation beyond the README (boilerplate plus the embedded quickstart script) and `docs/directory.md`, which is a link directory of third-party onion sites and was not used as a product source. - What `tgr` is (beyond its config: a keyserver client that can route through Tor) is not documented in any file read; only its `tgr/config.toml` keys are sourced. - The `arti/` directory in the tree and the extension's internals (`tor-bundle/proxy.js`, `tor.js`, `privacy.js`) were listed but not read in full; extension behavior above is taken from `manifest.json` and the popup/options file layout. - Example-config values are examples: the example torrc's ports (9002/9017/9031) differ from the quickstart-generated torrc (ControlPort 9051) and from torsocks' default Tor port (9050); no single canonical port set is stated in the repo. - Primo clones are known-stale estate-wide; the tor files read via the primo clone match the GitHub tree listing, but were not diffed byte-for-byte against GitHub HEAD.
REFERENCES
- Tor Specifications — indexThe Tor Project's specification index: the documents defining the protocols this repo's daemon, shipped configs, and clients implement.
- Tor Protocol Specification (tor-spec)The core protocol: circuit creation and incremental extension, relay cells, and the layered encryption the diagram peels hop by hop.
- Tor Rendezvous Specification, version 3 (rend-spec-v3)How v3 onion services rendezvous with their clients — the shipped example torrc publishes five v3 hidden services forwarding onion ports to local services.