Opened 4 years ago

Last modified 2 years ago

#17134 new enhancement

Add a way to say "Use this option only if supported" in torrc

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: intro, torrc, tor-testing, chutney-needs
Cc: Actual Points:
Parent ID: Points: small
Reviewer: Sponsor:

Description

It would be nice to have a torrc that sets some option _when Tor supports that option_, but not otherwise (eg when older versions of Tor read it).

There are two ways to do this I can think of:

  1. Future-compatible only

We could have a new syntax, something like ?Option Value. Meaning: if the option is prefixed with a question mark, it does not cause an error when unrecognized. (It _should_ cause a warning.)

  1. Backward-compatible too, kinda ugly

We could have a syntax that old Tor versions interpret as a comment, but which new Tor versions interpret as above. My first thought is to use some magic string like #$%^option value. This could cause problems if anybody is actually writing comments like that.

Child Tickets

Change History (11)

comment:1 Changed 4 years ago by nickm

Points: small

The design here will be the hard part; the implementation will be easy.

comment:2 Changed 4 years ago by nickm

Keywords: intro added

comment:3 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final

Throw most 0.2.8 "NEW" tickets into 0.2.9. I expect that many of them will subsequently get triaged out.

comment:4 Changed 4 years ago by isabela

Severity: Normal
Sponsor: SponsorS-can

comment:5 Changed 4 years ago by isabela

Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

tickets market to be removed from milestone 029

comment:6 Changed 4 years ago by nickm

Keywords: SponsorS-deferred added
Sponsor: SponsorS-can

Remove the SponsorS status from these items, which we already decided to defer from 0.2.9. add the SponsorS-deferred tag instead in case we ever want to remember which ones these were.

comment:7 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:8 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:9 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:10 Changed 2 years ago by nickm

Keywords: torrc tor-testing added; SponsorS-deferred removed

comment:11 Changed 2 years ago by teor

Keywords: chutney-needs added

As an aside, chutney has supported a feature like this for a few years now.

What we've discovered is that we want the condition to be something like "only add this option if it doesn't result in a config error" (for example, HiddenServiceVersion 3 on 0.3.1 and earlier). This covers "unsupported option" and "unsupported option value".

Note: See TracTickets for help on using tickets.