foss.

oniongate

openhat-security/oniongate

Desktop app that routes individual apps through isolated Tor circuits, hosts temporary or permanent onion sites, and verifies you aren't leaking outside Tor. Not a VPN, Tor Browser, Tails, or Whonix.

Star2
MonWedFri
AugSepOct
LessMore

OnionGate

OnionGate

A Tor workstation toolkit for macOS, Linux, and Windows.

Total release downloads Repository clones in the last 14 days

OnionGate is a desktop app that routes individual applications through isolated Tor circuits, turns a local port into an onion site, and inspects the live routing and leak-prevention boundary. It bundles and manages Tor for you — no terminal required — and ships a headless CLI for servers and scripts.

Read the documentation →

This project is alpha. It is not a VPN, Tor Browser, Tails, or a two-machine Tor gateway, and it must not be the sole control for high-risk work. It does not stop browser fingerprinting or global traffic correlation. Read the threat model and residual leaks first.

Potential leaks

Same-host routing cannot match a workstation that has no clearnet NIC. Even with the macOS NIC default-deny on, these remain:

  • kernel / NECP paths that never hit pf
  • any local process TCP’ing to a listed Tor endpoint IP
  • DHCP, optional LAN, and user destination exceptions
  • Linux/Windows (this lock is macOS-only)
  • Snowflake/meek (lock refused)

Full list: Residual leaks.

Routing modes: SOCKS vs TUN vs two-machine isolation

OnionGate can feel like a small “Tor VPN” app, but the protection boundary depends on which mode you use. A two-machine gateway keeps the workstation off the clearnet NIC. OnionGate is a same-host app that manages Tor and optionally a TUN.

System SOCKS (proxy mode)TUN modeTwo-machine gateway
Who must opt inEach app that honors SOCKSMost TCP on the machineEverything in the workstation
Ordinary browsers (Chrome, Firefox, Safari, …)Only if configured for SOCKS + remote DNSYes — captured by the tunnelYes — no clearnet path
Tor BrowserIgnores OS proxy; runs its own TorStock TB stacks Tor-over-Tor unless redirectedGateway Tor + no stacked Tor
DNSApp must use socks5h / remote DNSTor DNSPort when Resolve through Tor is onForced through the gateway
UDP / QUICCan leakBlockedBlocked / unavailable
Fail closed if Tor diesWeak (apps may go direct)Stronger (strict_route + Session Guard + optional NIC lock)Strong (workstation has no clearnet)
IsolationProcess / OS trust boundaryProcess / OS trust boundarySeparate machines + filtered control port

You do not need “Tor Browser via OnionGate” for arbitrary browsers.
Connect in TUN mode (all traffic via Tor, or your split-tunnel policy). Chrome, Firefox, Safari, and most apps then reach the network through OnionGate’s Tor.

When you do need the Tor Browser launcher: only if you want Tor Browser itself. Tor Browser always expects its own Tor on 127.0.0.1:9150. OnionGate already binds those Tor Browser ports on its managed Tor; the Apps → Tor Browser via OnionGate launcher sets TOR_SKIP_LAUNCH and points SOCKS/control at OnionGate so about:tor treats Tor as externally managed. Open that launcher, not the stock Tor Browser icon, while OnionGate is Connected. Details: Route applications and Connect.

SOCKS proxy alone is a convenience path: easy, but any app can ignore it. Prefer TUN when you want “any browser / most apps” containment on one machine. On macOS, Maximum Isolation adds a kernel pf default-deny so leftover public IP (including Apple daemons) cannot leave the NIC except to Tor’s allowlisted endpoints.

What you can do

  • Route apps through Tor — give each app its own isolated circuit, with a macOS/Linux Session Guard that suspends matching selected processes if their Tor/TUN route drops.
  • Host an onion site — expose 127.0.0.1:<port> as a v3 onion service with client authorization and a QR handoff. Make it temporary (key discarded at stop, address gone for good) or permanent (same address across restarts, with named client credentials you can revoke individually). See the hosting guide.
  • Inspect the live boundary — a background watch lists processes with clearnet TCP that is not going through OnionGate (ephemeral, not stored). Run on-demand diagnostics for egress separation, DNS, IPv6, UDP/QUIC, and per-app policy, then export a redacted report. Public IPs are compared in memory, never stored. Verification is not packet capture or formal proof.
  • Stay in control from the tray — inspect live status, connect/disconnect, rotate identity, or run Emergency Restore from the native macOS, Linux, or Windows widget.

Install

OnionGate is pre-1.0. Every published build is alpha software (x.y.z-alpha.N going forward) and must not be relied on for high-risk activity. Do not treat GitHub Latest or a plain 0.x install as a stable product.

Install only the current alpha from the GitHub Releases page (look for *-alpha* prereleases). Older plain v0.2.0…v0.2.4 releases are superseded and should not be installed. Verify the checksum, SBOM, and provenance before running anything.

Pre-1.0 macOS and Windows builds are not signed with an OS vendor certificate, so Gatekeeper and SmartScreen will warn on first launch. Release CI blocks any 1.0.0 or later stable release that is not fully signed.

Full instructions, including building from source, are in the install guide.

Command line

oniongate-cli is the headless companion. It hosts onion sites on machines with no GUI:

oniongate-cli start
oniongate-cli host add blog --local-port 3000
oniongate-cli host auth add blog alice

See the CLI guide.

Develop

Requires Node.js (see .nvmrc), Rust stable, Make, and the Tauri prerequisites for your OS. Prefer the Makefile targets (make help lists them all).

make setup          # npm ci + download/verify Tor / sing-box sidecars
make start          # start daemons, then tauri dev

Daemons (privileged helper install, status, and what is not a daemon) are documented in docs/guide/daemons.md.

Build a release bundle from source:

make build

Quality checks before a PR:

make check
make lint

Work on the documentation site:

make docs           # hot-reloading preview at http://localhost:5173

Contributing

Contributions are welcome under GPL-3.0. Please read CONTRIBUTING.md and our Code of Conduct first. Report security issues privately per SECURITY.md — never in a public issue.

Documentation

The full site is at openhat-security.github.io/oniongate.

License & trademark

Copyright (C) 2026 OpenHat Security.

OnionGate is licensed under GPL-3.0. It comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law; you are welcome to redistribute it under the terms of the GNU General Public License, version 3. Bundled component notices and corresponding-source links are in THIRD_PARTY.md.

Parts of the macOS hardening features are derived from term7's MacOS Privacy and Security Enhancements, Copyright (C) 2025 term7, licensed under GPL-3.0. Canonical repository: https://codeberg.org/term7/MacOS-Privacy-and-Security-Enhancements (GitHub mirror: https://github.com/term7/MacOS-Privacy-and-Security-Enhancements). Derived files carry their own modification notices; see third-party software.

OnionGate is an independent project — not affiliated with or endorsed by The Tor Project. "Tor" and the onion logo are trademarks of The Tor Project; OnionGate uses its own logo, not the official Tor onion logo.