## Do not edit this file!
## Please create and add modifications to the following file instead:
## /usr/local/etc/torrc.d/50_user.conf

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

## Please use "/usr/local/etc/torrc.d/50_user.conf" for your custom
## configuration, which will override the defaults found here.
## When this package is updated, this file may be overwritten.

#### meta start
#### project Whonix
#### category tor and usability
#### gateway_only yes
#### description

## This is non-ideal. Better would be to copy the contents from
## /usr/share/tor/tor-service-defaults-torrc.anondist into this file.
## Unfortunately this is required until "Qubes-Whonix eth1 static networking"
## gets implemented, see:
## https://phabricator.whonix.org/T947
##
## This is because Qubes uses dynamic local LAN IPs by default. By
## extension Qubes-Whonix internal LAN IP of virtual network interface eth1 is
## also dynamic. However, Tor needs to bind at a specific IP address. An IP
## address which needs to be written verbatim to a Tor configuration file
## before Tor starts. And Tor does not have any option to build to a network
## interface. Tor only supports binding to IP addresses. Tor also does not
## support reading the IP address into a variable or any scripting.
## Package qubes-whonix uses a dpkg trigger to modify the IP addresses written
## in file /usr/share/tor/tor-service-defaults-torrc.anondist to the current
## dynamic IP address of eth1. Having the dpkg trigger modify this file in /etc
## directly would be a bad idea since then this would falsely detected as a
## configuration file manually edited by users and users would get an
## interactive dpkg configuration file conflict resolution dialog during
## upgrade when this file is upgraded.
##
## Additionally, supporting kernel-level disabling of IPv6 requires
## dynamically commenting out IPv6 SOCKS and HTTP tunnel ports, preventing the
## use of a traditional conffile. Thus all SOCKS, HTTP tunnel, Trans, and DNS
## port config has been moved to this file.

%include /usr/share/tor/tor-service-defaults-torrc.anondist

#### meta end
