How to include files into torrc?

Hello, is it possible to include files into torrc? Something like this: # /etc/tor/torrc ORPort 443 # Policies are kept in separate file for readability Include /etc/tor/policies I checked https://www.torproject.org/docs/tor-manual.html.en but could not find anything. As an alternative, one can of course generate torrc from other files, but I'd rather use an include feature, if available. -Ralph

On Friday 09 September 2016 20:22:47 Ralph Seichter wrote:
There is a ticket that handles this feature: https://trac.torproject.org/projects/tor/ticket/1922 Regards, torland

On 09.09.16 20:37, tor-admin@torland.is wrote:
There is a ticket that handles this feature: https://trac.torproject.org/projects/tor/ticket/1922
Thank you for pointing me to the issue tracker, and thanks also to the other list members who replied. I was pretty certain that I was not the first person to ask for such a feature. -Ralph

If you're trying to apply the same policies across a number of relays on the same box, --defaults-torrc FILE can be used to provide default settings, and then each torrc can contain only the unique settings. But on some OSs / distributions (like Debian), the defaults torrc file is in /usr/share/tor, not /etc/tor. So if you want to modify it permanently, you'll need to protect that file from your package manager (using something like dpkg-divert), or change the --defaults-torrc path in your service manager (and if you're on Debian, that file is in /lib/systemd/system, and so you'll need to do dpkg-divert on it). Tim Tim Wilson-Brown (teor) teor2345 at gmail dot com PGP C855 6CED 5D90 A0C5 29F6 4D43 450C BA7F 968F 094B ricochet:ekmygaiu4rzgsk6n xmpp: teor at torproject dot org

Instead of modifying the shipped unit file + dpkg-* you can also replace specific unit file settings using the so called drop-in files: systemd.unit man page (debian stable):
https://www.freedesktop.org/software/systemd/man/systemd.unit.html https://wiki.archlinux.org/index.php/Systemd#Drop-in_files

On 11.09.2016 04:16, teor wrote:
Thanks, but I am looking for ways to use shared policies on different servers, each with different core settings (e.g. bandwidth). Syncing a policies file and including it seemed the most convenient way to do it, but until that feature becomes available, I'll stick to generating torrc. -Ralph
participants (7)
-
David Goulet
-
Ivan Markin
-
John Ricketts
-
nusenu
-
Ralph Seichter
-
teor
-
tor-admin@torland.is