Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#2415 closed enhancement (wontfix)

Torrc: allow following a linebreak (\) with a comment

Reported by: StrangeCharm Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

One major motivation for breaking a torrc entry over multiple lines is to make it easier to read a complex command with multiple arguments, like MyFamily, or ExitPolicy. A particularly valuable tool in these cases is the inline annotation of those entries. For instance: labeling MyFamily fingerprints with the node nicknames. To that end, it would be valuable to allow comments after linebreaks, the following becomes valid syntax:

AnEntry aparameter \ #description

otherparameter \ #commentary
moreparameters \ #explication

Child Tickets

Change History (11)

comment:1 Changed 9 years ago by Sebastian

Milestone: Tor: unspecified

I don't think this is necessarily worthwhile, putting the description above the parameter works and also makes it clear what the description refers to. That said, if someone wants to write a simple patch for post 0.2.2.x, also neat.

comment:2 in reply to:  description Changed 9 years ago by arma

Replying to StrangeCharm:

AnEntry aparameter \ #description

otherparameter \ #commentary
moreparameters \ #explication

Just to confirm, does it work to put the backslashes after the comments?

 AnEntry aparameter #description \
  otherparameter #commentary \
  moreparameters #explication

comment:3 Changed 9 years ago by Sebastian

No, it does not. One of the design goals was to make sure that it would be extremely hard to make a previously valid configuration invalid, and this would've happened if we allowed this.

comment:4 Changed 9 years ago by StrangeCharm

Cc: flamsmark+tortrac@… added

comment:5 Changed 9 years ago by StrangeCharm

Cc: flamsmark+tortrac@… removed

comment:6 Changed 8 years ago by Sebastian

Resolution: wontfix
Status: newclosed

I don't think this is a good idea anymore.

comment:7 in reply to:  6 Changed 8 years ago by StrangeCharm

Replying to Sebastian:

I don't think this is a good idea anymore.

Why not? Is there another conflicting requirement?

comment:8 Changed 8 years ago by Sebastian

We've had more issues with this special kind of continuation format (particularly on Windows, where often paths to directories end in a \) and I would really like to avoid complicating this any further.

comment:9 in reply to:  8 Changed 8 years ago by StrangeCharm

Perhaps a different linebreak character might mitigate that issue? The use case of breaking up and annotating complex entries remains.

comment:10 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:11 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.