]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add __SocksPort etc variants for non-persistent use
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2017 15:21:33 +0000 (10:21 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 23 Jan 2017 21:06:51 +0000 (16:06 -0500)
Implements feature 20956.

changes/feature20956 [new file with mode: 0644]
doc/tor.1.txt
src/or/config.c

diff --git a/changes/feature20956 b/changes/feature20956
new file mode 100644 (file)
index 0000000..1ebddb1
--- /dev/null
@@ -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.
index f1068cedc653db1b7ab61be8ba2d715276561560..330cdd44922b3bd490bd909b34b7c4c66bba8b41 100644 (file)
@@ -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
 -------
 
index 3b70b979f70306bf52dd843fab40523335daf7f5..fe6aa786e755c0c4f7a65aad5bca747dfb8b31b8 100644 (file)
@@ -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