Skip to content
Snippets Groups Projects
  • View options
  • View options
  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first

      Trac:
      Component: - Select a component to Tor Client

    • Nick Mathewson

      So it seems like the basic problem here is "dealing with super-long lines is a pain in the butt". If that's so, then branch "continuation" in my public might solve the issue at minimal destabilizing. Thoughts?

      Looks like a fine start, but I bet this won't please Scott because you still can't add comments.See branch continuation in my repository for an addition of that feature.

    • Roger Dingledine

      We should do something here for the poor screwed people who have been misusing the option all this time.

      Also moving to needs_review since apparently there's a patch to review.

      Trac:
      Priority: normal to minor
      Milestone: N/A to Tor: 0.2.2.x-final
      Status: new to needs_review

    • Nick Mathewson

      I'm not thrilled with the comment syntax; nothing else does comments that way. If I understand right, the syntax is something like this?

      ExcludeNodes \
      # Node1337 is run by the Bavarian Illuminati \
        Node1337, \
      # The operator of Node99 looked at me funny \
        Node99

      It changes the meaning of # and , since you can no longer interpret # as "Ignore the rest of the line" and you can no longer interpret \ as "combine this line and the next, then process". Instead you need to treat # as meaning "Ignore the rest of the line except for a \ if the \ is at the end." It also changes the semantics of previously valid torrcs, such as

      ContactInfo UberUser <uber@user.com> # /// Don't use my real email here! \\\
      Log info file /home/nick.mathewson/projects/tor-info.log

      Contrived, I admit.

      I'm okay saying either "No comments for you" here, or with adding a comment/continuation syntax that doesn't change the meaning of old torrcs.

      The comment syntax is supposed to be like this:

      ExcludeNodes \
      # Node1337 is run by the Bavarian Illuminati
        Node1337, \
      # The operator of Node99 looked at me funny
        Node99

      If you look at the unit test that I added, that should totally work. I also added a unit test for your example case to my branch, and that works, too. Did the commit that added a comment to the manpage have confusing words, or was the code confusing, or am I still missing something? Thanks!

    • Nick Mathewson

      hm. that looks better than what I thought it did. I wonder if we can get the manpage to explain this with an example. Somebody could still screw this up with something like

      ExcludeNodes \
      # START OF NODES \
      # a looked at me funny \
         a, \
      # b is run by the mafia \
         b, \
      # END OF NODES
      Contact ,commamaster

      But that isnt' too plausible.

      I would rather have the ability to add comments than worry about that case, because it seems that the main reason why we do this anyways is that people want comments for specific entries. It would be great to get feedback from someone who actually cared for the feature.

      I'll add an example to the manpage in a couple of days.

    • Nick Mathewson

      I tweaked it in branch continuation in my repository.

      I think, among other things, I removed a condition where we could run off the end of the string. When you did:

       } else if (*line == '#') {
         do {
           ++line;
         } while (*line && *line != '\n')
       }
       ++line; // OOPS

      consider what would happen when the last line in the file had a comment with no newline at the end. The loop would continue until *line=='\0', and then the second increment (marked "OOPS" above) would advance the line one more character. Ouch!

      And a completely cosmetic thing: It seems odd to day "Implements bug 1929". Implementing a bug sounds like you're putting it into the code. Since this is really a feature rather than a bugfix, I'm going with "resolves bug 1929", but "resolves ticket 1929" would also sound ok to me.

      Looks good for the code fixes, thanks.

      Your documentation might want to do what I added in branch continuation in my repo, though, since we do allow not putting a nl at the end of the torrc.

    • Nick Mathewson

      Retitled. Also, merged and closing.

      Trac:
      Summary: Setting *Nodes config options more than once means last entry is used to It's hard to specify a really long *Nodes option
      Resolution: N/A to implemented
      Status: needs_review to closed

    • Nick Mathewson

      Trac:
      Component: Tor Client to Tor