[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [goptlib/master] Bring spec quotations up to date.
commit 3549f210004266a5f7c62f174bc725720b07dc91
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Tue Jun 20 08:17:23 2017 -0700
Bring spec quotations up to date.
pt-spec.txt 0ef45b97b1a935489335fc31d625c463b076c1e3
196-transport-control-ports.txt f59e8f5b2819842fe6cb5b162a9226a4f1891b4d
---
args.go | 18 +++++++++---------
pt.go | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/args.go b/args.go
index 7672a35..c50bc93 100644
--- a/args.go
+++ b/args.go
@@ -58,10 +58,9 @@ func indexUnescaped(s string, term []byte) (int, string, error) {
// Parse a nameâ??value mapping as from an encoded SOCKS username/password.
//
-// "If any [k=v] items are provided, they are configuration parameters for the
-// proxy: Tor should separate them with semicolons ... If a key or value value
-// must contain [an equals sign or] a semicolon or a backslash, it is escaped
-// with a backslash."
+// "First the '<Key>=<Value>' formatted arguments MUST be escaped, such that all
+// backslash, equal sign, and semicolon characters are escaped with a
+// backslash."
func parseClientParameters(s string) (args Args, err error) {
args = make(Args)
if len(s) == 0 {
@@ -108,10 +107,11 @@ func parseClientParameters(s string) (args Args, err error) {
// Parse a transportâ??nameâ??value mapping as from TOR_PT_SERVER_TRANSPORT_OPTIONS.
//
-// "<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."
-// Example: trebuchet:secret=nou;trebuchet:cache=/tmp/cache;ballista:secret=yes
+// "...a semicolon-separated list of <key>:<value> pairs, where <key> is a PT
+// 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."
+// Example: scramblesuit:key=banana;automata:rule=110;automata:depth=3
func parseServerTransportOptions(s string) (opts map[string]Args, err error) {
opts = make(map[string]Args)
if len(s) == 0 {
@@ -192,7 +192,7 @@ func backslashEscape(s string, set []byte) string {
// of an SMETHOD line. The output is sorted by key. The "ARGS:" prefix is not
// added.
//
-// "Equal signs and commas [and backslashes] must be escaped with a backslash."
+// "Equal signs and commas [and backslashes] MUST be escaped with a backslash."
func encodeSmethodArgs(args Args) string {
if args == nil {
return ""
diff --git a/pt.go b/pt.go
index f910d55..6b0dd09 100644
--- a/pt.go
+++ b/pt.go
@@ -803,7 +803,7 @@ func extOrPortAuthenticate(s io.ReadWriter, info *ServerInfo) error {
return nil
}
-// See section 3.1 of 196-transport-control-ports.txt.
+// See section 3.1.1 of 196-transport-control-ports.txt.
const (
extOrCmdDone = 0x0000
extOrCmdUserAddr = 0x0001
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits