TOR SETUP AND CONFIGURATION — JAVASCRIPT

Tor

Tor

Version 1.00Source on GitHub

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

  1. 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.
  2. 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>`.
  3. 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).
  4. 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.
  5. 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.
How it works, step by step — each step as the project's own documentation states it.

CONCEPTS

A THREE-RELAY CIRCUIT — ONE ENCRYPTION LAYER PEELED PER HOPCLIENTbuilds the circuitGUARDentry relayMIDDLErelay onlyEXITfinal relayDESTINATIONweb servicewraps 3 layersone per relaypeels layer 1knows the client,not the destinationpeels layer 2knows neither endpeels layer 3sees the destination,not the clientplaintext arrivesreplies retrace thecircuit, re-wrappedHOW THE CIRCUIT IS BUILT — INCREMENTALLY, PER TOR-SPECthe client negotiates a session key with the guard, then extends the circuit one hop at a timeeach extension travels inside the existing circuit — a relay never holds another hop's keyNO SINGLE RELAY KNOWS BOTH ENDS OF THE CONVERSATIONthis repo's shipped torrc also publishes v3 onion services — rendezvous circuits are specified in rend-spec-v3applications reach the circuit through the local SOCKS port, directly or via torsocks
A Tor circuit as the protocol specifies it: the client builds the circuit incrementally, wrapping the payload in one encryption layer per relay; guard, middle, and exit each peel exactly one layer, so no single relay knows both ends. This repo's torrc, torsocks, and monitor configurations operate a client on such circuits.

CONFIGURATION

OptionDefaultWhat it does
SocksPort9002Tor SOCKS port in the example torrc
ControlPort`9031` in the example torrc; `9051` in the quickstart-generated torrcTor control port
DNSPort127.0.0.1:9017Tor DNS resolver port
CookieAuthentication1Authenticate control connections with a cookie file
DataDirectory`/home/example/.config/tor/data` in the example; `~/.local/share/tor` in the quickstart-generated torrcTor data directory
AutomapHostsOnResolve1Automap `.onion` hosts on resolve
HiddenServiceVersion3Hidden services are v3 (the repo test asserts this)
HiddenServicePorte.g. `80 127.0.0.1:8233` (nginx), `2040 127.0.0.1:22` (SSH), plus WKD, git, and mail forwardsMap an onion port to a local service
`TorAddress` (torsocks)127.0.0.1Tor instance torsocks connects to
`TorPort` (torsocks)9050Tor SOCKS port for torsocks
`AllowInbound` (torsocks)0Disallow inbound connections through torsocks
`AllowOutboundLocalhost` (torsocks)1Allow outbound localhost connections through torsocks
`OnionAddrRange` (torsocks)127.42.42.0/24Virtual address range for onion addresses
`use_tor` (tgr)trueRoute the `tgr` tool through Tor
`tor_socks_port` (tgr)9050Tor SOCKS port used by `tgr`
`default_keyserver` (tgr)hkp://keys.openpgp.orgDefault OpenPGP keyserver for `tgr` (`keyservers` also lists `hkp://pgp.mit.edu`)
`timeout` / `max_retries` / `refresh_interval` (tgr)30` / `5` / `3600Request timeout, retry cap, and refresh interval for `tgr`
`color_interface` (nyx)trueColored nyx interface
`graph_stat` (nyx)resourcesStatistic shown in the nyx graph (`graph_interval`: each second)
`tor_socks_address` (Tor Browser settings)127.0.0.1:9050SOCKS address in `torbrowser/settings.json` (`download_over_tor: true`, mirror `https://dist.torproject.org/`)
`TOR_VERSION` (installer)0.4.8.11Tor release the quickstart builds
`TORSOCKS_VERSION` (installer)2.4.0Torsocks release the quickstart builds
`TOR_BROWSER_DEFAULT` (installer)13.0.14Fallback Tor Browser version if the latest cannot be determined

CONTROLS

ActionControl
Install componentsRun `scripts/quickstart.sh` and choose `1`–`5`, `a` (all), or `q` (quit) at the menu
Launch tortor -f $XDG_CONFIG_HOME/tor/torrc
Launch Tor Browser`tor-browser` (linked by the installer)
Monitor tornyx --config $XDG_CONFIG_HOME/nyx/nyxrc
Use arti`arti` (after the Cargo-based install)
Torify a commandtorsocks <command>
Toggle browser proxying"Onion Control" extension popup (on/off) and its options page; permissions: storage, proxy, privacy, notifications, nativeMessaging
UninstallRemove 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

  1. Tor Specifications — indexThe Tor Project's specification index: the documents defining the protocols this repo's daemon, shipped configs, and clients implement.
  2. 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.
  3. 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.