|η (eta) 6e768510c1||2 months ago|
|.rpm||1 year ago|
|docker||1 year ago|
|migrations||10 months ago|
|src||3 months ago|
|.dockerignore||1 year ago|
|.gitignore||8 months ago|
|Cargo.lock||2 months ago|
|Cargo.toml||2 months ago|
|Dockerfile||1 year ago|
|LICENSE||2 years ago|
|PKGBUILD||1 year ago|
|README.md||1 year ago|
|config.example.toml||1 year ago|
|docker-compose.yml||1 year ago|
A WhatsApp Web and SMS bridge for internet relay chat (IRC). (slightly less beta!)
This repo really lives at git.theta.eu.org, but it's also on GitHub as well. PRs/issues more than welcome!
This monstrosity lets one user send and receive SMS messages through IRC, using a USB 3G modem plugged in to the server running it. It also has integrated support for WhatsApp, using the whatsappweb-rs library. Using it requires running your own IRC daemon, or having a friendly IRC daemon somewhere that lets you make large numbers of connections from one IP address.
It also has support for the InspIRCd spanning-tree protocol (v1.2), allowing you to link it to an IRC network as a pseudo-server. (This is the configuration used by the author, and is probably the most reliable way to use the bridge.)
This is also the spiritual successor of matrix-appservice-sms, in that it does the same thing as matrix-appservice-sms, except way more reliably and for a different protocol.
At minimum, you need:
If you want WhatsApp or attachments to work, you probably also need:
If you want to use the SMS stuff, you need:
Warning: sms-irc is not quite yet plug-and-play. You are expected to know a bit about how databases and web servers work in order to get everything connected together. In the future, things will be made easier.
In particular, the docker-compose setup method mentioned below lets you avoid having to worry about the IRCd. You'll still need to configure Postgres and a web server, though.
To build this thing, you need a decently recent stable version of Rust, and development
libraries for PostgreSQL (
pacman -S postgresql-libs on Arch). Then, it's as simple as
$ cargo build --release
to build it. Configuring it takes some more effort - read
for the gory details, and rename it to
config.toml when done. Then
$ cargo run --release
should get you up and running.
You can also install
sms-irc-git from the Arch Linux AUR, and edit the example configuration file at
Run the bridge with
$ sms-irc; at present, no systemd service file is included.
If you install Docker Compose, you can get up and running pretty quickly with a pre-configured copy of sms-irc and InspIRCd 3. You'll need to define five environment variables:
SMS_DATABASE_URL: a PostgreSQL database URL to use for the database.
SMS_ADMIN_NICK: the nickname you're going to connect as (e.g.
SMS_ATTACH_PATH: a path to somewhere on your server to store attachments (gets mounted in the container)
SMS_DL_PATH: a URL fragment for attachments, which will get at the files in
config.example.toml, but if a file is saved as
SMS_ATTACH_PATH/file.txt, sms-irc expects to hand out URLs like
SMS_DL_PATH/file.txtto IRC clients, and it's your job to make some web server make that all happen.
file://URI pointing at your
SMS_PORT: which port you want the IRC server to listen on
You might define these, for example, with
$ export SMS_PORT=9000 $ export SMS_ATTACH_PATH=/path/to/some/folder ...
For permanent use, you probably want to use some systemd config file or whatever.
After doing that, a swift
$ docker-compose up
in the repo directory should automatically configure everything for you! Simply connect to
SMS_PORT on your local machine,
/msg sms-irc help to learn about configuration. (If you want to oper-up, try
/oper oper sms-irc.)
If you're more hardcore, you can also use the Docker image directly, for example:
$ docker run --name sms-irc \ -v PATH_TO_STORE_DATA_AND_CONFIGS_IN:/data \ -e "SMSIRC_CONFIG=/data/config.toml" \ eeeeeta/sms-irc
This helps you avoid the building part - you'll want to provide it with a
PATH_TO_STORE_DATA_AND_CONFIGS_IN where you'll put your
config.toml, and under which you'll also want to store your data directories.