главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Wielicki <j.wielicki@sotecware.net>2018-04-20 12:48:44 +0200
committerJonas Wielicki <j.wielicki@sotecware.net>2018-04-20 12:48:44 +0200
commitf00025a39bf51f58c65a2c213e5b4a8741f40416 (patch)
tree5fd494c3bd8c998b3d792f14ca8fa60867173129
parentb1fa7ddc5f119919429395c7d2f3f746036c936f (diff)
Explain how we speak before the server
-rw-r--r--README.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 17eea4a..c0d72bf 100644
--- a/README.rst
+++ b/README.rst
@@ -11,6 +11,7 @@ Tricks and shortcuts
* We use ``tr`` to convert ``>`` to ``\n`` -- since sed is line (or NUL) based, there’s not really another way to parse XMPP XML (which generally never contains newlines) with sed.
* TLS is handled outside of sed for similar reasons. And to keep my sanity (some people might question whether I still have any bit of sanity left).
* Likewise, SRV lookup and composition of the authentication data is entirely handled in bash. This also means that only PLAIN SASL authentication is supported -- SCRAM requires a level of interactivity which would be extremely hard to achieve in sed (not impossible though; we would "just" have to implement base64 and sha1-hmac in sed).
+* Since XMPP is a protocol where the client speaks first, we need to hand sed some initial input to allow it to generate a "line" of output (the stream header). We do that with bash, and use that opportunity to pass some configuration to the sed program (namely JID and authentication string).
Usage
-----