#signal #webhook #sn0int #服务器 #API #数字 #signal-cli

应用 sn0int-signal

sn0int的signal webhook服务器

1个不稳定版本

0.1.0 2020年6月12日

106#webhook

GPL-3.0 许可协议

27KB
99

sn0int-signal

为kpcyrd/notify-signal sn0int模块提供简单的API。

您需要第二个电话号码来注册signal。固话号码可能也适用。

设置

确保您已安装、设置并配置到路径中的signal-cli

然后按照以下方式安装HTTP API:

git clone 'https://github.com/kpcyrd/sn0int-signal'
cd sn0int-signal
cargo install --path .

用法

sudo install -m 600 -o "$USER" /dev/null /etc/sn0int-signal.key
< /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 > /etc/sn0int-signal.key
sn0int-signal -k /etc/sn0int-signal.key 127.0.0.1:4321 +31337

测试

curl -v -H 'Content-Type: application/json' \
    -H "x-signal-auth: $(cat /etc/sn0int-signal.key)" \
    -d '{"to": "+313372", "body": "ohai"}' \
    http://127.0.0.1:4321/api/v0/send

启动时启动

# /etc/systemd/system/sn0int-your-other-service.service

[Unit]
Description=sn0int-signal: api for signal notifications

[Service]
User=your-user
ExecStart=/usr/local/bin/sn0int-signal -k /etc/sn0int-signal.key 127.0.0.1:4321 +31337

许可证

GPLv3+

依赖项

~29MB
~591K SLoC