aboutsummaryrefslogtreecommitdiff
path: root/spec/pt-spec/pluggable-transport-client-per-connection-arguments.md
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2023-10-12 12:27:58 -0400
committerNick Mathewson <nickm@torproject.org>2023-10-12 12:27:58 -0400
commitf7e5a95ee96d8ef52c1732d066c1249a6f84391e (patch)
tree2e1ddd85f471143518d0df7c7645d066d43bc149 /spec/pt-spec/pluggable-transport-client-per-connection-arguments.md
parente4e0d93d56ee8c1aec4c2efaa7046b651f0fe55c (diff)
downloadtorspec-f7e5a95ee96d8ef52c1732d066c1249a6f84391e.tar.gz
torspec-f7e5a95ee96d8ef52c1732d066c1249a6f84391e.zip
Convert text specifications to mdbook.
Diffstat (limited to 'spec/pt-spec/pluggable-transport-client-per-connection-arguments.md')
-rw-r--r--spec/pt-spec/pluggable-transport-client-per-connection-arguments.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/pt-spec/pluggable-transport-client-per-connection-arguments.md b/spec/pt-spec/pluggable-transport-client-per-connection-arguments.md
new file mode 100644
index 0000000..cce6748
--- /dev/null
+++ b/spec/pt-spec/pluggable-transport-client-per-connection-arguments.md
@@ -0,0 +1,38 @@
+<a id="pt-spec.txt-3.5"></a>
+## Pluggable Transport Client Per-Connection Arguments
+
+Certain PT transport protocols require that the client provides
+per-connection arguments when making outgoing connections. On
+the server side, this is handled by the "ARGS" optional argument
+as part of the "SMETHOD" message.
+
+On the client side, arguments are passed via the authentication
+fields that are part of the SOCKS protocol.
+
+First the "<Key>=<Value>" formatted arguments MUST be escaped,
+such that all backslash, equal sign, and semicolon characters
+are escaped with a backslash.
+
+Second, all of the escaped are concatenated together.
+
+Example:
+
+shared-secret=rahasia;secrets-file=/tmp/blob
+
+Lastly the arguments are transmitted when making the outgoing
+connection using the authentication mechanism specific to the
+SOCKS protocol version.
+
+```text
+ - In the case of SOCKS 4, the concatenated argument list is
+ transmitted in the "USERID" field of the "CONNECT" request.
+
+ - In the case of SOCKS 5, the parent process must negotiate
+ "Username/Password" authentication [RFC1929], and transmit
+ the arguments encoded in the "UNAME" and "PASSWD" fields.
+```
+
+If the encoded argument list is less than 255 bytes in
+length, the "PLEN" field must be set to "1" and the "PASSWD"
+field must contain a single NUL character.
+