Hi,
it is not clear to me whether ExcludeNodes and other similar options (ExcludeExitNodes) can be used multiple times in a torrc file.
Are all of the lines merged like multiple "MyFamily" lines or how does it behave?
thanks, nusenu
On Mon, Aug 10, 2020 at 6:13 PM nusenu nusenu-lists@riseup.net wrote:
Hi,
it is not clear to me whether ExcludeNodes and other similar options (ExcludeExitNodes) can be used multiple times in a torrc file.
Are all of the lines merged like multiple "MyFamily" lines or how does it behave?
No, only one is recognized.
If you try to start tor with ExcludeNodes set twice, it should say something like:
Aug 11 17:14:36.928 [warn] Option 'ExcludeNodes' used more than once; all but the last value will be ignored.
I'd welcome patches to clarify this in the documentation, or to allow this option to repeat.
Nick Mathewson:
On Mon, Aug 10, 2020 at 6:13 PM nusenu nusenu-lists@riseup.net wrote:
Hi,
it is not clear to me whether ExcludeNodes and other similar options (ExcludeExitNodes) can be used multiple times in a torrc file.
Are all of the lines merged like multiple "MyFamily" lines or how does it behave?
No, only one is recognized.
thanks for your reply.
Is there any way to comment fingerprints in ExcludeNodes?
Since everything after "#" is ignored I guess something like this is not possible since everything after the first fingerprint is a comment?
ExcludeNodes \ fingerprint1 # comment \ fingerprint2 # comment \ fingerprint3 # comment
Hi nusenu, tor's manual says [1]...
"To split one configuration entry into multiple lines, use a single backslash character () before the end of the line. Comments can be used in such multiline entries, but they must start at the beginning of a line."
I just double checked and it works...
======================================== torrc ========================================
ControlPort 9051
ExcludeNodes \ # nickname: moria1 9695DFC35FFEB861329B9F1AB04C46397020CE31, \ # nickname: tor26 847B1F850344D7876491A54892F904934E4EB85D
========================================
% cat demo.py from stem.control import Controller
with Controller.from_port() as controller: controller.authenticate() print(controller.get_conf('ExcludeNodes'))
% python demo.py 9695DFC35FFEB861329B9F1AB04C46397020CE31,847B1F850344D7876491A54892F904934E4EB85D
========================================
[1] https://2019.www.torproject.org/docs/tor-manual.html.en#_the_configuration_f...
Damian Johnson:
Hi nusenu, tor's manual says [1]...
"To split one configuration entry into multiple lines, use a single backslash character () before the end of the line. Comments can be used in such multiline entries, but they must start at the beginning of a line."
Thank you Damian! Reading the above I didn't expect that you can create a multiline entry without "" before the end of the line.
Now I'll play around to see how this works if a single multiline entry is split across multiple included files.