Skip to content
/ lb Public

MSC3079 Low Bandwidth library for servers and clients

License

Notifications You must be signed in to change notification settings

matrix-org/lb

Repository files navigation

Low Bandwidth Matrix

Go Reference

This repository implements MSC3079 in Go. It also provides several command line tools to get up to speed with existing low bandwidth enabled servers.

Mobile implementations

See mobile for Android/iOS bindings.

Command Line Tools

  • jc: This tool can be used to convert JSON <--> CBOR.
  • coap: This tool can be used to send a single CoAP request/response, similar to curl.
  • proxy: This tool can be used to add low bandwidth support to any Matrix homeserver.

These can be tied together to interact with low-bandwidth enabled Matrix servers. For example:

# convert inline JSON to CBOR then pipe into coap to localhost:8008 then convert the CBOR response back to JSON and print to stdout
./jc -out "-" '{"auth":{"type":"m.login.dummy"},"username":"foo","password":"barbarbar"}' \
| ./coap -X POST -d '-' -H "Content-Type: application/cbor" -k  https://localhost:8008/_matrix/client/r0/register \
| ./jc -c2j -out '-' '-'