Tor Support

Forward Tor SOCKS Requests

GnuPG tries to connect to socks5://localhost:9050 when Tor is detected or --use-tor is used. Since Tor isn’t running on localhost, socat is used to forward the request to Tor running in the Whonix gateway.

  1. Create a systemd service to forward requests

    Create ~/.config/systemd/user/tor-localhost-forward.service:

    Description=Forward Tor request on localhost to Whonix
    ExecStart=/usr/bin/socat TCP-LISTEN:9050,bind=localhost,fork TCP:
  2. Reload systemd:

    systemctl --user daemon-reload
  3. Enable and start service:

    systemctl --user enable --now tor-localhost-forward.service

Configure gpg/dirmngr

Config at ~/.gnupg/dirmngr.conf:

keyserver hkps://