"TOR_PT_SERVER_TRANSPORT_OPTIONS" -- A semicolon-separated list of <key>:<value> pairs, where <key> is a transport name and <value> is a k=v string value with options that are to be passed to the transport. Colons, semicolons, equal signs and backslashes MUST be escaped with a backslash. TOR_PT_SERVER_TRANSPORT_OPTIONS is optional and might not be present in the environment of the proxy if no options are need to be passed to transports.
This looks good to me. I was worried we might paint ourselves into a corner with respect to #12930 (moved) and #22088 (moved), but your changes look compatible with several reasonable options.
This would make it impossible for a key or a k to contains an equals sign; I guess that's all right.
Does the same inconsistency exist with regard to client SOCKS arguments?
First the "=" formatted arguments MUST be escaped, such that all backslash, equal sign, and semicolon characters are escaped with a backslash.
What is an implementation supposed to do when it finds a backslash that precedes something other than colon, semicolon, or backslash? That is, colon, semicolon, and backslash MUST be backslash-escaped, but MAY other characters be backslash-escaped? Also: are equals signs forbidden in v, or can you have unescaped ones as in t:k=base64==?
For what it's worth, goptlib allows any character to be backslash-escaped (and for that reason allows = in k). There is a test for it; I'd like to know if this specification change would require any change in the expected output. Input:
So, this change is just to make the spec match the code. And if I'm reading the code right, the only escaped values are \, ;, and :. We have never specified what happens if a different character is escaped.
= signs should not be forbidden in v; does the spec imply otherwise?