diff options
-rw-r--r-- | changes/feature20956 | 6 | ||||
-rw-r--r-- | doc/tor.1.txt | 13 | ||||
-rw-r--r-- | src/or/config.c | 13 |
3 files changed, 30 insertions, 2 deletions
diff --git a/changes/feature20956 b/changes/feature20956 new file mode 100644 index 0000000000..1ebddb1662 --- /dev/null +++ b/changes/feature20956 @@ -0,0 +1,6 @@ + o Minor features (configuration, controller): + - Each of the *Port options, such as SocksPort, ORPort, ControlPort, + and so on, now comes with a __*Port variant that will not be + saved to the torrc file by the controller's SAVECONF command. + This change allows TorBrowser to set up a single-use domain socket + for each time it launches Tor. Closes ticket 20956. diff --git a/doc/tor.1.txt b/doc/tor.1.txt index f1068cedc6..330cdd4492 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -2668,6 +2668,19 @@ The following options are used for running a testing Tor network. we replace it and issue a new key? (Default: 3 hours for link and auth; 1 day for signing.) +NON-PERSISTENT OPTIONS +---------------------- + +These options are not saved to the torrc file by the "SAVECONF" controller +command. Other options of this type are documented in control-spec.txt, +section 5.4. End-users should mostly ignore them. + +[[UnderscorePorts]] **\_\_ControlPort**, **\_\_DirPort**, **\_\_DNSPort**, **\_\_ExtORPort**, **\_\_NATDPort**, **\_\_ORPort**, **\_\_SocksPort**, **\_\_TransPort**:: + These underscore-prefixed options are variants of the regular Port + options. They behave the same, except they are not saved to the + torrc file by the controller's SAVECONF command. + + SIGNALS ------- diff --git a/src/or/config.c b/src/or/config.c index 3b70b979f7..fe6aa786e7 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -133,8 +133,17 @@ static config_abbrev_t option_abbrevs_[] = { /** An entry for config_vars: "The option <b>name</b> is obsolete." */ #define OBSOLETE(name) { name, CONFIG_TYPE_OBSOLETE, 0, NULL } -#define VPORT(member) \ - VAR(#member, LINELIST, member ## _lines, NULL) +/** + * Macro to declare *Port options. Each one comes in three entries. + * For example, most users should use "SocksPort" to configure the + * socks port, but TorBrowser wants to use __SocksPort so that it + * isn't stored by SAVECONF. The SocksPortLines virtual option is + * used to query both options from the controller. + */ +#define VPORT(member) \ + VAR(#member "Lines", LINELIST_V, member ## _lines, NULL), \ + VAR(#member, LINELIST_S, member ## _lines, NULL), \ + VAR("__" #member, LINELIST_S, member ## _lines, NULL) /** Array of configuration options. Until we disallow nonstandard * abbreviations, order is significant, since the first matching option will |