Giter VIP home page Giter VIP logo

signal-gateway's Introduction

Now, there's also a dockerized Signal Web Gateway


Signal SSH Gateway

I have already wrote a basic check_mk Signal notification plugin. But now, i needed more clients to send messages and don't want to register multiple numbers. So this is a basic gateway which delivers messages via SSH.

Prerequisites

Go and get janimo's Textsecure client. Check his wiki on how to get a working binary.

Setup

SSH

As SSH adds an authentication and encryption layer to the whole thing, i'm using it with authorized key files. I'd recommend a special user for this, probably best called signal or axolotl (the Signal protocol, sounds more fancy ๐Ÿ˜„) or similiar.

useradd -s /bin/bash -m -d /opt/signal-gateway axolotl

Now, create the authorized_keys file:

su - axolotl
mkdir -m 700 .ssh
(umask 077; touch .ssh/authorized_keys)

Now you need to add the public keys of the systems/users using this gateway.

Gateway

As the newly created user, clone this project:

su - axolotl
git clone https://github.com/morph027/signal-gateway

Signal

Please follow janimo's wiki on how to setup the client properly. You then need to put the binary, the .config and .storage into the bin folder of this project. Rename textsecure to signal (or create a softlink).

Usage

SSH

ssh [-i /your/ssh/folder/id_rsa_or_so] user@yourserver /folder/to/signal-gateway/bin/signal-wrapper --from someone --to account.from.your.signal.address.book.or.phone.number --message \"this is your message\"

Group Chat

You need to set the hexid (see .storage/groups/${hexid}) of the group as --to.

Queuing

To add messages to s simple queue (in case of internet failures), you can pass --queue. Basically, the messages will be added to a text file which will then be read by a script later (e.g. fired by cron).

Cron: crontab -u user -e and then add */5 * * * * /folder/to/signal-gateway/bin/signal-resend

signal-gateway's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

nuzulfikrie

signal-gateway's Issues

Can't register because of catcha

Since signal has started integrating google recaptcha into its signup process, the gateway cannot register anymore. I don't know if there is any way around it, but right now, the gateway cannot be used to register

Error: no prekey for contact, device 1

I had this running perfectly in docker for some time. Recently (not sure exactly when, a few months) I've been getting the following error when trying to send a message:

Error: no prekey for contact +15555555555, device 1

The phone number is a valid phone number (not all 5s). I have removed it for privacy reasons. I do get a warning during launch that contacts.yml is not present. Is this related?

If it matters, I'm using this for a method of 2FA in NextCloud.

Edit:
I have tried the rekey command. It returned successful, but I get the same error about a missing prekey when attempting to send a message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.