Skip to main content

No project description provided

Project description

Signald spectrum2 backend

What is this?

This is a way to connect to the signal instant messaging network using other messaging networks such as XMPP.

It can act as a linked device to your main signal device (your phone), or as a standalone replacement for official signal clients. The latter is my personal use case so this is what is most tested.

Alternatively, you might be interested in the signald python interface in spectrum2_signald/signald.py.

What do I need?

Could you be a little more specific?

Python stuff

python3 -m venv signald-venv
source signald-venv/bin/activate
pip install spectrum2-signald

XMPP Server

Configure a specific component in your XMPP server, for instance with prosody, add something like this to /etc/prosody/prosody.cfg.lua:

modules_enabled = {
  -- [...]
  "privilege";
}

 -- [...]

Component "signal.example.com"
    component_secret = "something-random"
    modules_enabled = {"privilege"}

-- [...]

VirtualHost "example.com"
    privileged_entities = {
        ["signal.example.com"] = {
            roster = "both";
            message = "outgoing";
        }
    }

The privilege thing is not mandatory, but will allow carbons for messages sent from official signal clients to be sent to XMPP clients.

From my experience, reloading configuration and components while prosody is running is not enough to get the privilege thing working, so you might need to systemctl restart prosody at this point.

Signald

Have the /var/lib/signald/attachments directory readable for the user that runs spectrum2 if you want attachments to work.

Spectrum2

Modify the signal.cfg file to match the component secret, path to the right python interpreter and main.py script, and http upload stuff for attachments. Copy it to /etc/spectrum2/transports. You should now be able to use spectrum2_manager signal.example.com start.

XMPP client

  • Discover services on your server.
  • Subscribe to the gateway signal.example.com, using your phone number as a username.
  • If you already used signald with this phone number, your roster should populate with your signal contacts and you should be able to send receive/contacts.
  • If you did not configure signald for this phone number, you should receive a message from a signal@signal.example.com prompting you with instructions to either register your phone number or to link signald to the official signal app.
  • To see which groups are available send a message with "groups" as body to this user to get a link of XMPP URIs to join your groups.

How secure is this?

Not as secure as using the official signal client, especially since this is pre-alpha software. You can read more about it in this gitlab issue. As a rule of thumb, if your main concern is privacy and security, you should use the official signal clients. However, if you are running your own XMPP server, this shouldn't be a lot less "secure" than anything else on your XMPP server.

Multi-user considerations

Right now, it is not safe at all to allow public registrations, because of spectrum and signald. This should be improved some day. Right now, my advice is to only use it on your own server, and disable public registrations as soon as you register your user.

What works?

  • Send/receive private messages.
  • Join and send/receive messages from groups.
  • Attachments if the the script has access to a dir that is publicly available via http.
  • Carbons for self messages sent from official signal clients.

What doesn't work?

  • It crashes quite often, especially this issue seems to be really annoying.
  • Groups need to be manually joined via the XMPP client.
  • Unsubscribing via XMPP does not delete the signald user.

What is the license?

Something free (libre), yet to be determined. I am no expert in this stuff.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spectrum2-signald-0.1.4.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectrum2_signald-0.1.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file spectrum2-signald-0.1.4.tar.gz.

File metadata

  • Download URL: spectrum2-signald-0.1.4.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.3 Linux/4.19.0-13-amd64

File hashes

Hashes for spectrum2-signald-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0538cef9eacfccd4deacd9e231424cf579884d878e96a0e69c4fd11b966794b5
MD5 56816fbab0be52783d118b6700fd50a9
BLAKE2b-256 b54228ffb13d707678b8a2a10c9385ad7968fbe959b28bf8e43e565006dd0ffd

See more details on using hashes here.

File details

Details for the file spectrum2_signald-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: spectrum2_signald-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.3 Linux/4.19.0-13-amd64

File hashes

Hashes for spectrum2_signald-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3dd61010563f848719b65b2a4162395e5cc0b1f5b696b4495e7835238d15b675
MD5 60e2a9f49641451a4c8ac58faaf4cbc7
BLAKE2b-256 67e694a4a849c028847f93a61fc733453450c573db08b6864b50ebcbf17d5bcb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page