A bot/broker that forwards SMS messages to telegram. Intended to work with the app.
The deployed bot is running at https://forwarder.whatever.team and is accessible via https://t.me/smsforwarderrobot.
- Copy
.env.exampleand add your telegram token. If you don't want to set up a webhook with something like ngrok, setFWD_LONG_POLLINGtotrue. - Spin up a postgres container with the command below.
$ docker-compose -f docker-compose-dev.yml up -d- Run the app with with
just devorcargo run(you have to manually set the env variables).
- Copy
.env.exampleand add your telegram token and database password. SetDB_HOST=db. SetFWD_USE_LONG_POLLING=falseto use webhooks. Note that you can use long polling in production if you want, but it's not recommended. - If you care about rate limiting, set
FWD_IP_SOURCEto an appropriate value for your hosting service instead of the defaultConnectInfo. For example, if you use an exposed nginx, you can set it toX-Real-IPafter bindingX-Real-IPto$remote_addrin the nginx config. - Run docker-compose to build and start the app:
$ docker-compose -f docker-compose.yml up -dThe container will be exposed at 127.0.0.1:6336 by default.
Archived in the python branch. Migrating an existing deployment to rust should be seamless, just correctly convert configs/production.env to .env.